afs: Use named constants for mvstat
authorAndrew Deason <adeason@sinenomine.net>
Fri, 13 Feb 2015 23:31:37 +0000 (17:31 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 21 Aug 2015 22:52:48 +0000 (18:52 -0400)
commit65cffcadb96389ff3e794eb822d2231220c71160
tree25e7525c7f1e2ff56bb36af825b9358d1ad90a2d
parent721451286285d4cc15b2fc22bfcde83b21e954a3
afs: Use named constants for mvstat

Currently the vcache 'mvstat' field is assigned three magic values: 0
for normal files and directories, 1 for mountpoint objects, and 2 for
volume root dirs. These values are clearly defined in comments, but
everywhere we actually assign or compare these values, we use the bare
numbers.

Stop this nonsense and use named constants, to make the code less
inscrutable.

Change-Id: Ic1b133109d619b70317141431f163e552bafd109
Reviewed-on: http://gerrit.openafs.org/11747
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
13 files changed:
src/afs/DARWIN/osi_misc.c
src/afs/DARWIN/osi_vnodeops.c
src/afs/LINUX/osi_export.c
src/afs/LINUX/osi_vnodeops.c
src/afs/SOLARIS/osi_vnodeops.c
src/afs/VNOPS/afs_vnop_access.c
src/afs/VNOPS/afs_vnop_attrs.c
src/afs/VNOPS/afs_vnop_lookup.c
src/afs/VNOPS/afs_vnop_readdir.c
src/afs/afs.h
src/afs/afs_disconnected.c
src/afs/afs_pioctl.c
src/afs/afs_vcache.c