From caf037a4564991d6eec6b36de621348598bcb349 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 4 Jul 2005 12:24:40 -0500 Subject: [PATCH] Fix debugfs's set_inode_fields command from silently failing. The set_inodes_field command was silently failing when setting one of the following fields: frag, fsize, uid_high, gid_high, and author. The type size for these fields were set to an incorrect value in the inode_fields table. --- debugfs/ChangeLog | 6 ++++++ debugfs/set_fields.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/debugfs/ChangeLog b/debugfs/ChangeLog index ea89d34..b3ff40c 100644 --- a/debugfs/ChangeLog +++ b/debugfs/ChangeLog @@ -1,3 +1,9 @@ +2005-07-04 Theodore Ts'o + + * set_fields.c: Fix a bug which caused set_inode_field to silently + fail when setting the following fields: frag, fsize, + uid_high, gid_high, and author. + 2006-06-30 Theodore Ts'o * Release of E2fsprogs 1.38 diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c index 35ddba9..f4f6784 100644 --- a/debugfs/set_fields.c +++ b/debugfs/set_fields.c @@ -136,11 +136,11 @@ static struct field_set_info inode_fields[] = { { "file_acl", &set_inode.i_file_acl, 4, parse_uint }, { "dir_acl", &set_inode.i_dir_acl, 4, parse_uint }, { "faddr", &set_inode.i_faddr, 4, parse_uint }, - { "frag", &set_inode.osd2.linux2.l_i_frag, 8, parse_uint }, - { "fsize", &set_inode.osd2.linux2.l_i_fsize, 8, parse_uint }, - { "uid_high", &set_inode.osd2.linux2.l_i_uid_high, 8, parse_uint }, - { "gid_high", &set_inode.osd2.linux2.l_i_gid_high, 8, parse_uint }, - { "author", &set_inode.osd2.hurd2.h_i_author, 8, parse_uint }, + { "frag", &set_inode.osd2.linux2.l_i_frag, 1, parse_uint }, + { "fsize", &set_inode.osd2.linux2.l_i_fsize, 1, parse_uint }, + { "uid_high", &set_inode.osd2.linux2.l_i_uid_high, 2, parse_uint }, + { "gid_high", &set_inode.osd2.linux2.l_i_gid_high, 2, parse_uint }, + { "author", &set_inode.osd2.hurd2.h_i_author, 4, parse_uint }, { "bmap", NULL, 4, parse_bmap, FLAG_ARRAY }, { 0, 0, 0, 0 } }; -- 1.8.3.1