patch-2.1.90 linux/fs/coda/coda_linux.c

Next file: linux/fs/coda/dir.c
Previous file: linux/fs/coda/cnode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.89/linux/fs/coda/coda_linux.c linux/fs/coda/coda_linux.c
@@ -32,14 +32,15 @@
 /* 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 @@
 	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;
@@ -97,11 +105,6 @@
 	return coda_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)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov