diff options
Diffstat (limited to 'misc/e2initrd_helper.c')
-rw-r--r-- | misc/e2initrd_helper.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/misc/e2initrd_helper.c b/misc/e2initrd_helper.c index b2f39bc4..765716d6 100644 --- a/misc/e2initrd_helper.c +++ b/misc/e2initrd_helper.c @@ -39,8 +39,8 @@ extern char *optarg; #include "../version.h" #include "nls-enable.h" -const char * program_name = "get_fstab"; -char * device_name; +static const char * program_name = "e2initrd_helper"; +static char * device_name; static int open_flag; static int root_type; static blkid_cache cache = NULL; @@ -327,7 +327,7 @@ static void PRS(int argc, char **argv) usage(); device_name = blkid_get_devname(NULL, argv[optind], NULL); if (!device_name) { - com_err("tune2fs", 0, _("Unable to resolve '%s'"), + com_err(program_name, 0, _("Unable to resolve '%s'"), argv[optind]); exit(1); } @@ -342,6 +342,10 @@ static void get_root_type(ext2_filsys fs) int ret; retval = get_file(fs, "/etc/fstab", &file); + if (retval) { + com_err(program_name, retval, "couldn't open /etc/fstab"); + exit(1); + } while (!mem_file_eof(&file)) { buf = get_line(&file); |