diff options
author | Eric Biggers <ebiggers@google.com> | 2023-01-21 12:32:26 -0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-01-27 12:48:15 -0500 |
commit | de4f0ad497b0c1cb38b0dc12b550e8a6c6581472 (patch) | |
tree | 9147ec6cfd16127a93ad72f0fb250297895dc1cb /misc/tune2fs.c | |
parent | 525e37988d8f6f880fef56b9d3ba4e2bac17b226 (diff) | |
download | e2fsprogs-de4f0ad497b0c1cb38b0dc12b550e8a6c6581472.tar.gz |
misc/tune2fs: fix setting fsuuid::fsu_len
Minus does not mean equals.
Besides fixing an obvious bug, this avoids the following compiler
warning with clang -Wall:
tune2fs.c:3625:20: warning: expression result unused [-Wunused-value]
fsuuid->fsu_len - UUID_SIZE;
~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
Fixes: a83e199da0ca ("tune2fs: Add support for get/set UUID ioctls.")
Reviewed-by: Jeremy Bongio <bongiojp@gmail.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'misc/tune2fs.c')
-rw-r--r-- | misc/tune2fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 5fe22e6a..2f7d9f3c 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -3627,7 +3627,7 @@ _("Warning: The journal is dirty. You may wish to replay the journal like:\n\n" ret = -1; #ifdef __linux__ if (fsuuid) { - fsuuid->fsu_len - UUID_SIZE; + fsuuid->fsu_len = UUID_SIZE; fsuuid->fsu_flags = 0; memcpy(&fsuuid->fsu_uuid, new_uuid, UUID_SIZE); ret = ioctl(fd, EXT4_IOC_SETFSUUID, fsuuid); |