public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-ext4@vger.kernel.org, Jeremy Bongio <bongiojp@gmail.com>
Subject: Re: [e2fsprogs PATCH] tune2fs: fix setting fsuuid::fsu_len
Date: Wed, 4 Jan 2023 11:36:51 +0100	[thread overview]
Message-ID: <20230104103651.eaxele7amb5t7tpu@fedora> (raw)
In-Reply-To: <20230104090401.276188-1-ebiggers@kernel.org>

On Wed, Jan 04, 2023 at 01:04:01AM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
> 
> 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;
>                         ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~

Looks good, thanks!

Reviewed-by: Lukas Czerner <lczerner@redhat.com>

> 
> Fixes: a83e199da0ca ("tune2fs: Add support for get/set UUID ioctls.")
> Cc: Jeremy Bongio <bongiojp@gmail.com>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>  misc/tune2fs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/misc/tune2fs.c b/misc/tune2fs.c
> index 088f87e5..7937b8b5 100644
> --- a/misc/tune2fs.c
> +++ b/misc/tune2fs.c
> @@ -3622,7 +3622,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);
> -- 
> 2.39.0
> 


  reply	other threads:[~2023-01-04 10:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04  9:04 [e2fsprogs PATCH] tune2fs: fix setting fsuuid::fsu_len Eric Biggers
2023-01-04 10:36 ` Lukas Czerner [this message]
     [not found]   ` <CAOvQCn6r83snFOsX78F3BSV9GaNJ-mWPUgQmdrQ0_nA+nvHWVQ@mail.gmail.com>
2023-01-05 19:28     ` Eric Biggers
2023-01-05 19:03 ` Jeremy Bongio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230104103651.eaxele7amb5t7tpu@fedora \
    --to=lczerner@redhat.com \
    --cc=bongiojp@gmail.com \
    --cc=ebiggers@kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox