Commit 4ea0a110 authored by Theodore Ts'o's avatar Theodore Ts'o
Browse files

ChangeLog, problem.c, problem.h, super.c:

  problem.c, problem.h (PR_0_HURD_CLEAR_FILETYPE): Add new problem code.
  super.c (check_super_block): If the OS type in the superblock is the
  	Hurd, check to see if the filetype feature is set, and offer to clear
  	it if so.  This needs to be done since the Hurd doesn't properly
  	support the filetype feature.  (And since the hurd allows the
  	transmogrification of files to special files and vice versa --- for no
  	good reason that I can understand --- it can't support the filetype
  	feature for the forseeable future, either.)
ChangeLog, mke2fs.c:
  mke2fs.c (main): We forcibly turn off the filetype feature if the OS
  	is the hurd, since the hurd doesn't support it.  (And since the hurd
  	allows the transmogrification of files to special files and vice versa
  	--- for no good reason that I can understand --- it can't support the
  	filetype feature for the forseeable future, either.)
  mke2fs.c (proceed_question): Fix reversed sense of proceed_question
  	that was busted due to the internationalization patch.  Fixed bug
  	where if proceed_question was called twice, the input buffer wasn't
  	cleared of the previous question's newline.
ChangeLog, expect.1, expect.2, image.gz, name:
  f_hurd: Add test for Hurd-specific features (right now, just checks to
  	make sure the filetype feature is cleared)
ChangeLog, ls.c:
  ls.c (list_super): Change the string displayed for the Hurd to be
  	GNU/Hurd, instead of just "GNU".
parent 3030daa8
2000-05-08 Theodore Ts'o <tytso@valinux.com>
* problem.c, problem.h (PR_0_HURD_CLEAR_FILETYPE): Add new problem
code.
* super.c (check_super_block): If the OS type in the superblock is
the Hurd, check to see if the filetype feature is set, and
offer to clear it if so. This needs to be done since the
Hurd doesn't properly support the filetype feature.
(And since the hurd allows the transmogrification of files
to special files and vice versa --- for no good reason
that I can understand --- it can't support the filetype
feature for the forseeable future, either.)
2000-04-03 Theodore Ts'o <tytso@valinux.com>
* unix.c: For platforms that don't define optarg.h, manually
......
......@@ -167,9 +167,13 @@ static const struct e2fsck_problem problem_table[] = {
/* Inode count in superblock is incorrect */
{ PR_0_INODE_COUNT_WRONG,
N_("@i count in @S is %i, should be %j\n"),
N_("@i count in @S is %i, should be %j.\n"),
PROMPT_FIX, 0 },
{ PR_0_HURD_CLEAR_FILETYPE,
N_("The Hurd does not support the filetype feature.\n"),
PROMPT_CLEAR, 0 },
/* Pass 1 errors */
/* Pass 1: Checking inodes, blocks, and sizes */
......
......@@ -91,6 +91,9 @@ struct problem_context {
/* Inode count in the superblock incorrect */
#define PR_0_INODE_COUNT_WRONG 0x00000D
/* The Hurd does not support the filetype feature */
#define PR_0_HURD_CLEAR_FILETYPE 0x00000E
/*
* Pass 1 errors
*/
......
......@@ -205,18 +205,33 @@ void check_super_block(e2fsck_t ctx)
ext2fs_mark_super_dirty(fs);
}
clear_problem_context(&pctx);
#ifndef EXT2_SKIP_UUID
/*
* If the UUID field isn't assigned, assign it.
*/
if (!(ctx->options & E2F_OPT_READONLY) && uuid_is_null(s->s_uuid)) {
clear_problem_context(&pctx);
if (fix_problem(ctx, PR_0_ADD_UUID, &pctx)) {
uuid_generate(s->s_uuid);
ext2fs_mark_super_dirty(fs);
}
}
#endif
/*
* For the Hurd, check to see if the filetype option is set,
* since it doesn't support it.
*/
if (fs->super->s_creator_os == EXT2_OS_HURD &&
(fs->super->s_feature_incompat &
EXT2_FEATURE_INCOMPAT_FILETYPE)) {
if (fix_problem(ctx, PR_0_HURD_CLEAR_FILETYPE, &pctx)) {
fs->super->s_feature_incompat &=
~EXT2_FEATURE_INCOMPAT_FILETYPE;
ext2fs_mark_super_dirty(fs);
}
}
return;
}
2000-05-08 Theodore Ts'o <tytso@valinux.com>
* ls.c (list_super): Change the string displayed for the Hurd to
be GNU/Hurd, instead of just "GNU".
Thu Apr 6 17:38:00 2000 Theodore Y. Ts'o <tytso@signal.thunk.org>
* feature.c: Make feature_list static; it shouldn't be exported.
......
......@@ -230,7 +230,7 @@ void list_super (struct ext2_super_block * s)
printf ("\n");
switch (s->s_creator_os) {
case EXT2_OS_LINUX: os = "Linux"; break;
case EXT2_OS_HURD: os = "GNU"; break;
case EXT2_OS_HURD: os = "GNU/Hurd"; break;
case EXT2_OS_MASIX: os = "Masix"; break;
default: os = "unknown"; break;
}
......
2000-05-08 Theodore Ts'o <tytso@valinux.com>
* mke2fs.c (main): We forcibly turn off the filetype feature if
the OS is the hurd, since the hurd doesn't support it.
(And since the hurd allows the transmogrification of files
to special files and vice versa --- for no good reason
that I can understand --- it can't support the filetype
feature for the forseeable future, either.)
* mke2fs.c (proceed_question): Fix reversed sense of
proceed_question that was busted due to the
internationalization patch. Fixed bug where if
proceed_question was called twice, the input buffer wasn't
cleared of the previous question's newline.
Thu Apr 6 17:50:25 2000 Theodore Y. Ts'o <tytso@signal.thunk.org>
* badblocks.c (flush_bufs): Use fsync() if the system doesn't
......
......@@ -125,14 +125,15 @@ static int int_log10(unsigned int arg)
static void proceed_question(NOARGS)
{
int c;
char buf[256];
char *short_yes = _("yY");
fflush(stdout);
fflush(stderr);
printf(_("Proceed anyway? (y,n) "));
c = getchar();
if (strchr(short_yes, (char) c))
buf[0] = 0;
fgets(buf, sizeof(buf), stdin);
if (strchr(short_yes, buf[0]) == 0)
exit(1);
}
......@@ -1033,6 +1034,14 @@ int main (int argc, char *argv[])
exit(1);
}
/*
* For the Hurd, we will turn off filetype since it doesn't
* support it.
*/
if (fs->super->s_creator_os == EXT2_OS_HURD)
fs->super->s_feature_incompat &=
~EXT2_FEATURE_INCOMPAT_FILETYPE;
/*
* Set the volume label...
*/
......
2000-05-08 Theodore Ts'o <tytso@valinux.com>
* f_hurd: Add test for Hurd-specific features (right now, just
checks to make sure the filetype feature is cleared)
2000-04-06 Theodore Ts'o <tytso@valinux.com>
* f_filetype: Updated expect script to match with new text for
......
The Hurd does not support the filetype feature.
Clear? yes
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
test_filesys: 11/16 files (0.0% non-contiguous), 20/100 blocks
Exit status is 1
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
test_filesys: 11/16 files (0.0% non-contiguous), 20/100 blocks
Exit status is 0
File added
GNU/Hurd specific tests
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment