Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfs/nfs_commonsubs.c
Show First 20 Lines • Show All 1,396 Lines • ▼ Show 20 Lines | for (bitpos = 0; bitpos < NFSATTRBIT_MAX; bitpos++) { | ||||
case NFSATTRBIT_FSID: | case NFSATTRBIT_FSID: | ||||
NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); | NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED); | ||||
thyp = fxdr_hyper(tl); | thyp = fxdr_hyper(tl); | ||||
tl += 2; | tl += 2; | ||||
thyp2 = fxdr_hyper(tl); | thyp2 = fxdr_hyper(tl); | ||||
if (compare) { | if (compare) { | ||||
if (*retcmpp == 0) { | if (*retcmpp == 0) { | ||||
if (thyp != (u_int64_t) | if (thyp != (u_int64_t) | ||||
vfs_statfs(vnode_mount(vp))->f_fsid.val[0] || | (&(vnode_mount(vp)->mnt_stat))->f_fsid.val[0] || | ||||
rmacklem: It might read better as
vp->v_mount->mnt_stat.f_fsid.val[0] ||
instead of taking the… | |||||
thyp2 != (u_int64_t) | thyp2 != (u_int64_t) | ||||
rmacklemUnsubmitted Done Inline ActionsYou could take this a step further and replace Both vfs_statfs() and vnode_mount() were Mac OS/X's way of doing things via Since the Mac OS/X port is ancient history, I have planned on eventually rmacklem: You could take this a step further and replace
vnode_mount(vp) with vp->v_mount. For example… | |||||
vfs_statfs(vnode_mount(vp))->f_fsid.val[1]) | (&(vnode_mount(vp)->mnt_stat))->f_fsid.val[1]) | ||||
*retcmpp = NFSERR_NOTSAME; | *retcmpp = NFSERR_NOTSAME; | ||||
} | } | ||||
} else if (nap != NULL) { | } else if (nap != NULL) { | ||||
nap->na_filesid[0] = thyp; | nap->na_filesid[0] = thyp; | ||||
nap->na_filesid[1] = thyp2; | nap->na_filesid[1] = thyp2; | ||||
} | } | ||||
attrsum += (4 * NFSX_UNSIGNED); | attrsum += (4 * NFSX_UNSIGNED); | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 3,376 Lines • Show Last 20 Lines |
It might read better as
instead of taking the address of and then
using it as a pointer.
(Same below.)