diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-08-19 08:27:59 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-08-19 08:27:59 -0400 |
commit | 59a591f6b50e88100f22666d3ce28087a1ff24f0 (patch) | |
tree | 6f83e5174e81d2bc3b7907955c863e36f998b04d /debugfs | |
parent | c47cd4f28768bd3768c1074ac6b9274fcfddd3cd (diff) | |
download | e2fsprogs-59a591f6b50e88100f22666d3ce28087a1ff24f0.tar.gz |
debugfs: fix set_inode_field block[IND|DIND|TIND]
After we determine that we can't parse the array value as an integer,
we need to restore the square brackets to the field name, so that we
can find a match with block[IND], block[DIND], and block[TIND] in the
inode field table.
Reported-by: Jun He <jhe@cs.wisc.edu>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'debugfs')
-rw-r--r-- | debugfs/set_fields.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c index 40dc5e7c..6104b2be 100644 --- a/debugfs/set_fields.c +++ b/debugfs/set_fields.c @@ -321,8 +321,11 @@ static struct field_set_info *find_field(struct field_set_info *fields, */ if (idx) { array_idx = strtol(idx, &tmp, 0); - if (*tmp) + if (*tmp) { + *(--idx) = '['; + *delim = ']'; idx = 0; + } } /* |