summaryrefslogtreecommitdiff
path: root/misc/fsck.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>1999-03-16 19:35:19 +0000
committerTheodore Ts'o <tytso@mit.edu>1999-03-16 19:35:19 +0000
commit5d45d80375943be8917302a502f3f28d2df8d16d (patch)
treedcbd7b2db6ec6167f339de7136068cc1d08cfbd7 /misc/fsck.c
parent4a9f59366b3c5503bde40e9566dc996a0a40626f (diff)
downloade2fsprogs-5d45d80375943be8917302a502f3f28d2df8d16d.tar.gz
ChangeLog, Makefile.in, fsck.c, mke2fs.c, uuidgen.1.in, uuidgen.c:
uuidgen.c, uuidgen.1.in: Created command-line utility to generate UUIDs. fsck.c (fsck_device, execute): Don't dereference a null pointer when checking a filesystem not in /etc/fstab.
Diffstat (limited to 'misc/fsck.c')
-rw-r--r--misc/fsck.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/fsck.c b/misc/fsck.c
index 678da9ae..669e307f 100644
--- a/misc/fsck.c
+++ b/misc/fsck.c
@@ -362,7 +362,7 @@ static int execute(char *prog, char *device, char *mntpt)
}
if (verbose || noexecute) {
- printf("[%s -- %s] ", s, mntpt);
+ printf("[%s -- %s] ", s, mntpt ? mntpt : device);
for (i=0; i < argc; i++)
printf("%s ", argv[i]);
printf("\n");
@@ -517,7 +517,7 @@ static void fsck_device(char *device)
type = DEFAULT_FSTYPE;
sprintf(prog, "fsck.%s", type);
- retval = execute(prog, device, fsent->mountpt);
+ retval = execute(prog, device, fsent ? fsent->mountpt : 0);
if (retval) {
fprintf(stderr, "%s: Error %d while executing %s for %s\n",
progname, retval, prog, device);