diff options
Diffstat (limited to 'fs/coda/coda_linux.c')
-rw-r--r-- | fs/coda/coda_linux.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/fs/coda/coda_linux.c b/fs/coda/coda_linux.c index e968f3add..4fe096df9 100644 --- a/fs/coda/coda_linux.c +++ b/fs/coda/coda_linux.c @@ -32,14 +32,15 @@ int coda_access_cache = 1; /* caller must allocate 36 byte string ! */ char * coda_f2s(ViceFid *f) { - static char s[50]; + static char s[60]; if ( f ) { - sprintf(s, "(%10lx,%10lx,%10lx)", + sprintf(s, "(%-#lx,%-#lx,%-#lx)", f->Volume, f->Vnode, f->Unique); } return s; } +/* recognize special .CONTROL name */ int coda_iscontrol(const char *name, size_t length) { if ((CFS_CONTROLLEN == length) && @@ -48,16 +49,23 @@ int coda_iscontrol(const char *name, size_t length) return 0; } +/* recognize /coda inode */ int coda_isroot(struct inode *i) { if ( i->i_sb->s_root->d_inode == i ) { - return 1; + return 1; } else { - return 0; + return 0; } } - +/* is this a volume root FID */ +int coda_fid_is_volroot(struct ViceFid *fid) +{ + return ( (fid->Vnode == 1) && (fid->Unique == 1 ) ); +} + +/* put the current process credentials in the cred */ void coda_load_creds(struct coda_cred *cred) { cred->cr_uid = (vuid_t) current->uid; @@ -98,11 +106,6 @@ unsigned short coda_flags_to_cflags(unsigned short flags) } -int coda_fid_is_volroot(struct ViceFid *fid) -{ - return ( (fid->Vnode == 1) && (fid->Unique == 1 ) ); -} - /* utility functions below */ void coda_vattr_to_iattr(struct inode *inode, struct coda_vattr *attr) { |