aboutsummaryrefslogtreecommitdiff
path: root/util-linux/hexdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/hexdump.c')
-rw-r--r--util-linux/hexdump.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index 8ac12f082..48edd70a9 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -16,11 +16,19 @@
static void bb_dump_addfile(dumper_t *dumper, char *name)
{
- parser_t *parser = config_open2(name, xfopen_for_read);
- while (config_read(parser, &name, 1, 1, "# \t", 0)) {
- bb_dump_add(dumper, name);
+ char *p;
+ FILE *fp;
+ char *buf;
+
+ fp = xfopen_for_read(name);
+ while ((buf = xmalloc_fgetline(fp)) != NULL) {
+ p = skip_whitespace(buf);
+ if (*p && (*p != '#')) {
+ bb_dump_add(dumper, p);
+ }
+ free(buf);
}
- config_close(parser);
+ fclose(fp);
}
static const char *const add_strings[] = {