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>
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);