From: Hartmut Reuter Date: Thu, 1 Nov 2001 03:54:40 +0000 (+0000) Subject: fast-restart-exit-if-no-args-20011031 X-Git-Tag: openafs-devel-1_3_0~167 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=dcc63e13efe02161e688a9bbbe6d97aea7e5f636;p=packages%2Fo%2Fopenafs.git fast-restart-exit-if-no-args-20011031 when using fast restart, if salvager took no args, assume it's the fs bnode and exit --- diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index eed39e563..80860aabb 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -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);