Coda File System

cfs lv local undocumented, prints zeros that are wrong

From: Greg Troxel <gdt_at_ir.bbn.com>
Date: Fri, 16 Jan 2004 16:16:31 -0500
Earlier I sent mail perhaps to Jan or perhaps to the list saying that
cfs lv was dumping core on me.  I was in a cfs (crypto fs) dir with
ciphertext in coda, doing

cfs lv ~/%co/

where %co is a symlink to my coda home dir from my (regular fs)
homedir.

This doesn't happen any more, so I don't know what's up.

I found that -local was not documented, and that fs size was printed
even though local cfs lv doesn't get that.

Fix: apply simple patch:

--- cfs.cc.~4.56.~	Wed Jan 14 08:45:52 2004
+++ cfs.cc	Fri Jan 16 16:11:18 2004
@@ -282,8 +282,8 @@
             NULL
         },
         {"listvol", "lv", ListVolume, 
-            "cfs listvol <dir> [<dir> <dir> ...]",
-            "Display volume status",
+            "cfs listvol [-local] <dir> [<dir> <dir> ...]",
+            "Display volume status (-local avoids querying server)",
             NULL
         },
         {"lookaside", "lka", LookAside, 
@@ -1850,7 +1850,8 @@
         if (*motd) printf("  Message of the day is \"%s\"\n", motd);
         printf("  Volume type is %s\n", xlate_vvtype(vs->Type));
 	printf("  Connection State is %s\n", print_conn_state(conn_state));
-	if (conn_state!=Emulating) { /* info not avail if disconnected */
+	/* info not avail if disconnected, or if we did a local query */
+	if (conn_state!=Emulating && local_only == 0) {
 	    printf("  Minimum quota is %lu,", vs->MinQuota);
 	    if (vs->MaxQuota > 0)
 		printf(" maximum quota is %lu\n", vs->MaxQuota);
Received on 2004-01-16 16:17:46