X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=dump%2Fmain.c;h=c2e4eaf329c94e77e671c50915ec4e027313d792;hb=79e318657e7faa7b2951ff554dc6f1b92624a477;hp=0890d409105e919d5115acce22642bbbf2313351;hpb=4f94452b3d04736ed24c99d1f267853f818528d5;p=dump.git diff --git a/dump/main.c b/dump/main.c index 0890d40..c2e4eaf 100644 --- a/dump/main.c +++ b/dump/main.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.22 2000/03/08 10:51:29 stelian Exp $"; + "$Id: main.c,v 1.23 2000/08/19 23:48:10 stelian Exp $"; #endif /* not lint */ #include @@ -410,6 +410,18 @@ main(int argc, char *argv[]) NAMELEN); } #endif + + if (directory[0] != 0) { + if (level != '0') { + (void)fprintf(stderr, "Only level 0 dumps are allowed on a subdirectory\n"); + exit(X_STARTUP); + } + if (uflag) { + (void)fprintf(stderr, "You can't update the dumpdates file when dumping a subdirectory\n"); + exit(X_STARTUP); + } + } + spcl.c_dev[NAMELEN-1]='\0'; spcl.c_filesys[NAMELEN-1]='\0'; (void)strncpy(spcl.c_label, labelstr, sizeof(spcl.c_label) - 1);