]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
fast-restart-exit-if-no-args-20011031
authorHartmut Reuter <reuter@rzg.mpg.de>
Thu, 1 Nov 2001 03:54:40 +0000 (03:54 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 1 Nov 2001 03:54:40 +0000 (03:54 +0000)
when using fast restart, if salvager took no args, assume it's the fs bnode
and exit

src/vol/vol-salvage.c

index eed39e5632789f2c539853ad3ee6715e9596905d..80860aabbae933f96ab3b08135b7036ee0d6d510 100644 (file)
@@ -478,7 +478,7 @@ static handleit(as)
 {
     register struct cmd_item *ti;
     char pname[100], *temp;
-    afs_int32 seenpart = 0, seenvol = 0, vid = 0;
+    afs_int32 seenpart = 0, seenvol = 0, vid = 0, seenany = 0, i;
     struct DiskPartition *partP;
 
 #ifdef AFS_SGI_VNODE_GLUE
@@ -488,6 +488,18 @@ static handleit(as)
     }
 #endif
 
+#ifdef FAST_RESTART
+    for (i = 0; i < CMD_MAXPARMS; i++) {
+        if (as->parms[i].items) {
+            seenany = 1;
+            break;
+        }
+    }
+    if (!seenany) {
+      printf("Exiting immediately without salvage. Look into the FileLog to find volumes which really need to be salvaged!\n");
+      Exit(0);
+    }
+#endif /* FAST_RESTART */
     if (ti = as->parms[0].items) {     /* -partition */
        seenpart = 1;
        strncpy(pname, ti->data, 100);