. 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;
|
char *question;
|
||||||
{
|
{
|
||||||
register int c, answerchar;
|
register int c, answerchar;
|
||||||
|
static int note = 0;
|
||||||
|
|
||||||
if (!repair) {
|
if (!repair) {
|
||||||
printf("\n");
|
printf("\n");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
printf("%s? ", question);
|
printf("%s? ", question);
|
||||||
|
if(!note) { printf("(y=yes, n=no, q=quit, A=for yes to all) "); note = 1; }
|
||||||
if (automatic) {
|
if (automatic) {
|
||||||
printf("yes\n");
|
printf("yes\n");
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
if ((c = answerchar = getchar()) == 'q' || c == 'Q') exit(1);
|
if ((c = answerchar = getchar()) == 'q' || c == 'Q') exit(1);
|
||||||
|
if(c == 'A') { automatic = 1; c = 'y'; }
|
||||||
while (!eoln(c)) c = getchar();
|
while (!eoln(c)) c = getchar();
|
||||||
return !(answerchar == 'n' || answerchar == 'N');
|
return !(answerchar == 'n' || answerchar == 'N');
|
||||||
}
|
}
|
||||||
@ -670,8 +673,6 @@ int nblk;
|
|||||||
register i;
|
register i;
|
||||||
register bitchunk_t *p = bitmap;
|
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)
|
for (i = 0; i < nblk; i++, bno++, p += WORDS_PER_BLOCK)
|
||||||
devwrite(btoa(bno), (char *) p, block_size);
|
devwrite(btoa(bno), (char *) p, block_size);
|
||||||
}
|
}
|
||||||
|
@ -316,6 +316,13 @@ char *argv[];
|
|||||||
grpid = BINGRP;
|
grpid = BINGRP;
|
||||||
simple = 1;
|
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;
|
nrblocks = blocks;
|
||||||
nrinodes = inodes;
|
nrinodes = inodes;
|
||||||
|
|
||||||
@ -323,11 +330,6 @@ char *argv[];
|
|||||||
special(argv[--optind]);
|
special(argv[--optind]);
|
||||||
|
|
||||||
#ifdef UNIX
|
#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) {
|
if (!donttest) {
|
||||||
short *testb;
|
short *testb;
|
||||||
ssize_t w;
|
ssize_t w;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user