[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1408451445-17669-1-git-send-email-tytso@mit.edu>
Date: Tue, 19 Aug 2014 08:30:45 -0400
From: Theodore Ts'o <tytso@....edu>
To: Ext4 Developers List <linux-ext4@...r.kernel.org>
Cc: jhe@...wisc.edu, Theodore Ts'o <tytso@....edu>
Subject: [PATCH] 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@...wisc.edu>
Signed-off-by: Theodore Ts'o <tytso@....edu>
---
debugfs/set_fields.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c
index 40dc5e7..6104b2b 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;
+ }
}
/*
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists