From 585a358e516a04b7920200a0ca6eca6f4b41e7ea Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Thu, 14 Dec 2023 09:57:35 -0700 Subject: [PATCH] Minor touchups to new chkfs test Signed-off-by: Ralph Castain --- test/chkfs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/chkfs.c b/test/chkfs.c index b8d8ef0b3a..f5be48d5f7 100644 --- a/test/chkfs.c +++ b/test/chkfs.c @@ -38,7 +38,6 @@ static int mountpoint(char *filename, char **fstype) } while (getmntent_r(fp, &mnt, buf, sizeof(buf))) { - fprintf(stderr, "MNT: %s %s\n", mnt.mnt_fsname, mnt.mnt_dir); fd = open(mnt.mnt_dir, O_RDONLY); if (0 > fd) { // probably lack permissions @@ -75,8 +74,12 @@ int main(int argc, char **argv) for (n=1; NULL != argv[n]; n++) { rc = mountpoint(argv[n], &fstype); - fprintf(stdout, "Return: %d File: %s FStype: %s\n", rc, argv[n], fstype); - free(fstype); + if (0 == rc) { + fprintf(stdout, "Return: %d File: %s FStype: %s\n", rc, argv[n], fstype); + free(fstype); + } else { + fprintf(stdout, "File: %s Unknown type\n", argv[n]); + } } return 0;