char *question;
{
register int c, answerchar;
+ static int note = 0;
if (!repair) {
printf("\n");
return(0);
}
printf("%s? ", question);
+ if(!note) { printf("(y=yes, n=no, q=quit, A=for yes to all) "); note = 1; }
if (automatic) {
printf("yes\n");
return(1);
}
fflush(stdout);
if ((c = answerchar = getchar()) == 'q' || c == 'Q') exit(1);
+ if(c == 'A') { automatic = 1; c = 'y'; }
while (!eoln(c)) c = getchar();
return !(answerchar == 'n' || answerchar == 'N');
}
register i;
register bitchunk_t *p = bitmap;
- printf("writing bitmap - %d blocks from block %d\n",
- nblk, bno);
for (i = 0; i < nblk; i++, bno++, p += WORDS_PER_BLOCK)
devwrite(btoa(bno), (char *) p, block_size);
}
grpid = BINGRP;
simple = 1;
}
+
+ if(ULONG_MAX / block_size <= blocks-1) {
+ fprintf(stderr, "Warning: too big for filesystem to currently\n");
+ fprintf(stderr, "run on (max 4GB), truncating.\n");
+ blocks = ULONG_MAX / block_size;
+ }
+
nrblocks = blocks;
nrinodes = inodes;
special(argv[--optind]);
#ifdef UNIX
- if(ULONG_MAX / block_size <= blocks-1) {
- fprintf(stderr, "Device too big for filesystem to currently run on (max 4GB).\n");
- return 1;
- }
-
if (!donttest) {
short *testb;
ssize_t w;