60 lines
1.9 KiB
Plaintext
60 lines
1.9 KiB
Plaintext
$OpenBSD: patch-dialects_n+obsd_dnode_c,v 1.3 2003/09/02 18:53:29 pvalchev Exp $
|
|
--- dialects/n+obsd/dnode.c.orig 2003-06-11 06:45:16.000000000 -0500
|
|
+++ dialects/n+obsd/dnode.c 2003-08-30 23:35:37.000000000 -0500
|
|
@@ -68,8 +68,8 @@ getmemsz(pid)
|
|
if (!p->P_VMSPACE
|
|
|| kread((KA_T)p->P_VMSPACE, (char *)&vm, sizeof(vm)))
|
|
return;
|
|
- Lf->sz = (SZOFFTYPE)ctob(vm.vm_tsize + vm.vm_dsize
|
|
- + vm.vm_ssize);
|
|
+ Lf->sz = (SZOFFTYPE)((vm.vm_tsize + vm.vm_dsize
|
|
+ + vm.vm_ssize) * sysconf(_SC_PAGESIZE));
|
|
Lf->sz_def = 1;
|
|
return;
|
|
}
|
|
@@ -531,11 +531,11 @@ process_overlaid_node:
|
|
nty = EXT2NODE;
|
|
|
|
# if defined(HASI_E2FS_PTR)
|
|
- if (i.i_din.e2fs_din
|
|
- && !kread((KA_T)i.i_din.e2fs_din, (char *)&ed, sizeof(ed)))
|
|
+ if (i.dinode_u.e2fs_din
|
|
+ && !kread((KA_T)i.dinode_u.e2fs_din, (char *)&ed, sizeof(ed)))
|
|
edp = &ed;
|
|
# else /* !defined(HASI_E2FS_PTR) */
|
|
- edp = &i.i_din.e2fs_din;
|
|
+ edp = &i.dinode_u.e2fs_din;
|
|
# endif /* defined(HASI_E2FS_PTR) */
|
|
|
|
} else
|
|
@@ -552,16 +552,16 @@ process_overlaid_node:
|
|
&& !kread((KA_T)i.i_ump, (char *)&um, sizeof(um))) {
|
|
if (um.um_fstype == UFS1) {
|
|
ffs = 1;
|
|
- if (i.i_din.ffs1_din
|
|
- && !kread((KA_T)i.i_din.ffs1_din, (char *)&u1,
|
|
+ if (i.dinode_u.ffs1_din
|
|
+ && !kread((KA_T)i.dinode_u.ffs1_din, (char *)&u1,
|
|
sizeof(u1)))
|
|
{
|
|
u1s = 1;
|
|
}
|
|
} else if (um.um_fstype == UFS2) {
|
|
ffs = 2;
|
|
- if (i.i_din.ffs2_din
|
|
- && !kread((KA_T)i.i_din.ffs2_din, (char *)&u2,
|
|
+ if (i.dinode_u.ffs2_din
|
|
+ && !kread((KA_T)i.dinode_u.ffs2_din, (char *)&u2,
|
|
sizeof(u2)))
|
|
{
|
|
u2s = 1;
|
|
@@ -682,7 +682,7 @@ process_overlaid_node:
|
|
rdevs = 1;
|
|
}
|
|
# else /* !defined(HASI_E2FS_PTR) */
|
|
- rdev = i.i_din.e2fs_din.e2di_rdev;
|
|
+ rdev = i.dinode_u.e2fs_din.e2di_rdev;
|
|
rdevs = 1;
|
|
# endif /* defined(HASI_E2FS_PTR) */
|
|
|