summaryrefslogtreecommitdiff
path: root/misc/tune2fs.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2022-08-31 17:01:21 -0400
committerTheodore Ts'o <tytso@mit.edu>2022-08-31 17:01:21 -0400
commit75797f6467209db1b653686d09a6618dca728750 (patch)
tree52a1dc2d58c487c90dde1f40334439af900a6e2f /misc/tune2fs.c
parentfe341d59ee9696f66ec8cd1bf9615ee1a107824f (diff)
downloade2fsprogs-75797f6467209db1b653686d09a6618dca728750.tar.gz
misc: fix test for unavailable mountpoint in tune2fs
Addresses-Coverity-Bug: 1510127 Fixes: a83e199da0ca ("tune2fs: Add support for get/set UUID ioctls") Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'misc/tune2fs.c')
-rw-r--r--misc/tune2fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index c07ad52d..9f0d4379 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -3588,7 +3588,7 @@ _("Warning: The journal is dirty. You may wish to replay the journal like:\n\n"
#ifdef __linux__
if ((mount_flags & EXT2_MF_MOUNTED) &&
- !(mount_flags & EXT2_MF_READONLY) && mntpt) {
+ !(mount_flags & EXT2_MF_READONLY) && mntpt[0]) {
fd = open(mntpt, O_RDONLY);
if (fd >= 0)
fsuuid = malloc(sizeof(*fsuuid) + UUID_SIZE);