diff options
author | Theodore Ts'o <tytso@mit.edu> | 2019-11-08 17:17:35 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2019-11-09 01:55:14 -0500 |
commit | 8335d3c57ec077d8fb6beeaed7c7bb1fe7bca17e (patch) | |
tree | ba8df7a19c1b64733a3a2d65692927af7259ce54 /misc/tune2fs.c | |
parent | db113c0e76826d621dfc5ee968ccbbe2127363a6 (diff) | |
download | e2fsprogs-8335d3c57ec077d8fb6beeaed7c7bb1fe7bca17e.tar.gz |
Rename functions, types, constants to reflect jbd2 usage
We had previously stuck to using the names from ext3/jbd kernel files,
and used a script in contrib/jbd2-resync.sh to convert the kernel
files to use the ext3/jbd conventions so we could keep the files
e2fsck/recovery.c and e2fsck/revoke.c in sync with jbd2/recovery.c and
jbd2/revoke.c, respectively.
This has been getting harder and harder, so let's make a global sweep
through e2fsprogs to use the jbd2 names. Fortunately none of the
ext3/jbd names had leaked out into publically exported header files,
so this is only an internal change. Which looks scary, but it's
basically a search and replace, so if it compiles it's going to be
correct.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'misc/tune2fs.c')
-rw-r--r-- | misc/tune2fs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 8368a733..9a3ddff5 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -222,8 +222,8 @@ static int get_journal_sb(ext2_filsys jfs, char buf[SUPERBLOCK_SIZE]) } jsb = (journal_superblock_t *) buf; - if ((jsb->s_header.h_magic != (unsigned)ntohl(JFS_MAGIC_NUMBER)) || - (jsb->s_header.h_blocktype != (unsigned)ntohl(JFS_SUPERBLOCK_V2))) { + if ((jsb->s_header.h_magic != (unsigned)ntohl(JBD2_MAGIC_NUMBER)) || + (jsb->s_header.h_blocktype != (unsigned)ntohl(JBD2_SUPERBLOCK_V2))) { fputs(_("Journal superblock not found!\n"), stderr); return EXT2_ET_BAD_MAGIC; } @@ -231,7 +231,7 @@ static int get_journal_sb(ext2_filsys jfs, char buf[SUPERBLOCK_SIZE]) return 0; } -static __u8 *journal_user(__u8 uuid[UUID_SIZE], __u8 s_users[JFS_USERS_SIZE], +static __u8 *journal_user(__u8 uuid[UUID_SIZE], __u8 s_users[JBD2_USERS_SIZE], int nr_users) { int i; @@ -296,7 +296,7 @@ static int remove_journal_device(ext2_filsys fs) jsb = (journal_superblock_t *) buf; /* Find the filesystem UUID */ nr_users = ntohl(jsb->s_nr_users); - if (nr_users > JFS_USERS_MAX) { + if (nr_users > JBD2_USERS_MAX) { fprintf(stderr, _("Journal superblock is corrupted, nr_users\n" "is too high (%d).\n"), nr_users); commit_remove_journal = 1; @@ -2813,7 +2813,7 @@ fs_update_journal_user(struct ext2_super_block *sb, __u8 old_uuid[UUID_SIZE]) jsb = (journal_superblock_t *) buf; /* Find the filesystem UUID */ nr_users = ntohl(jsb->s_nr_users); - if (nr_users > JFS_USERS_MAX) { + if (nr_users > JBD2_USERS_MAX) { fprintf(stderr, _("Journal superblock is corrupted, nr_users\n" "is too high (%d).\n"), nr_users); return EXT2_ET_CORRUPT_JOURNAL_SB; |