Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abeb84e
)
debugfs: allow comment lines in command file
author
Andreas Dilger
<adilger@whamcloud.com>
Fri, 7 Feb 2020 01:09:42 +0000
(18:09 -0700)
committer
Theodore Ts'o
<tytso@mit.edu>
Sat, 29 Feb 2020 23:29:50 +0000
(18:29 -0500)
Allow comment lines with '#' at the start of the line in the command
file passed in to debugfs via the "-f" option or from standard input.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Lustre-bug-id: https://jira.whamcloud.com/browse/LU-13197
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/debugfs.c
patch
|
blob
|
history
diff --git
a/debugfs/debugfs.c
b/debugfs/debugfs.c
index
e33c92e
..
6325f25
100644
(file)
--- a/
debugfs/debugfs.c
+++ b/
debugfs/debugfs.c
@@
-2494,6
+2494,10
@@
static int source_file(const char *cmd_file, int ss_idx)
while (!feof(f)) {
if (fgets(buf, sizeof(buf), f) == NULL)
break;
+ if (buf[0] == '#') {
+ printf("%s", buf);
+ continue;
+ }
cp = strchr(buf, '\n');
if (cp)
*cp = 0;