[OpenAFS-devel] patch for backup addvolentry

Mattias Amnefelt mattiasa@e.kth.se
19 Feb 2001 05:40:49 +0100


The following is a patch which fixes backup addvolentry. I wonder when it
got broken. I don't think anyone here has fiddled with the volsets since
afs-3.3.

Also, if bc_FindVolumeSet fails com_err will be called without a reasonable
value. This made me kinda confused while debugging. I don't think com_err
should be called when code has a basicly uninitialized value, I'm however
too unexperienced with the openafs code to know how to hande the error
instead.

/mattiasa

--- bucoord/vol_sets.c	Sat Nov  4 11:04:08 2000
+++ bucoord/vol_sets.c	Mon Feb 19 05:21:25 2001
@@ -66,6 +66,12 @@
     partitionName = as->parms[2].items->data;
     volRegExp     = as->parms[3].items->data;
 
+    code = bc_UpdateVolumeSet();
+    if (code) {
+       com_err(whoami, code, "; Can't retrieve volume sets");
+       return(code);
+    }
+
     ctPtr = &bc_globalConfig->configText[TB_VOLUMESET];
 
     tset = bc_FindVolumeSet(bc_globalConfig, volSetName);