From dcc63e13efe02161e688a9bbbe6d97aea7e5f636 Mon Sep 17 00:00:00 2001 From: Hartmut Reuter Date: Thu, 1 Nov 2001 03:54:40 +0000 Subject: [PATCH] fast-restart-exit-if-no-args-20011031 when using fast restart, if salvager took no args, assume it's the fs bnode and exit --- src/vol/vol-salvage.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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); -- 2.39.5