. fsck has A for yes-to-all response
. mkfs makes filesystems on devices >4GB, but truncates them at 4GB
This commit is contained in:
parent
e17ced44ee
commit
5939b6a4d7
|
@ -248,18 +248,21 @@ int yes(question)
|
|||
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');
|
||||
}
|
||||
|
@ -670,8 +673,6 @@ int nblk;
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -316,6 +316,13 @@ char *argv[];
|
|||
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;
|
||||
|
||||
|
@ -323,11 +330,6 @@ char *argv[];
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue