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>
Change-Id: I9284a254104f355b0bac4c676ae85cbed63ebbe5
Reviewed-on: https://review.whamcloud.com/37438
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
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;