public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "наб via Libc-alpha" <libc-alpha@sourceware.org>
Cc: наб <nabijaczleweli@nabijaczleweli.xyz>
Subject: Re: [PATCH 2/2] linux: statvfs: allocate spare for f_type
Date: Mon, 26 Jun 2023 15:15:29 +0200	[thread overview]
Message-ID: <87cz1i74b2.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <169a6ec2a9957495275964afd0697fa3aea1c6b6.1687552604.git.nabijaczleweli@nabijaczleweli.xyz> (=?utf-8?B?ItC90LDQsQ==?= via Libc-alpha"'s message of "Fri, 23 Jun 2023 22:37:02 +0200")

* наб via Libc-alpha:

> diff --git a/sysdeps/unix/sysv/linux/bits/statvfs.h b/sysdeps/unix/sysv/linux/bits/statvfs.h
> index 8dfb5ce761..cf98460e00 100644
> --- a/sysdeps/unix/sysv/linux/bits/statvfs.h
> +++ b/sysdeps/unix/sysv/linux/bits/statvfs.h
> @@ -51,7 +51,8 @@ struct statvfs
>  #endif
>      unsigned long int f_flag;
>      unsigned long int f_namemax;
> -    int __f_spare[6];
> +    unsigned int f_type;
> +    int __f_spare[5];
>    };
>  
>  #ifdef __USE_LARGEFILE64
> @@ -71,7 +72,8 @@ struct statvfs64
>  #endif
>      unsigned long int f_flag;
>      unsigned long int f_namemax;
> -    int __f_spare[6];
> +    unsigned int f_type;
> +    int __f_spare[5];
>    };
>  #endif

I think the caller can check for f_type being zero to check if it has
been written by glibc, so this does not require a new symbol version.
The previous already initializes __f_spare to zero, and none of the
magic values in <linux/magic.h> are zero.

This should perhaps have a NEWS entry, though, and a test case.

Thanks,
Florian


  reply	other threads:[~2023-06-26 13:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23 20:36 [PATCH 1/2] hurd: statvfs: __f_type -> f_type наб
2023-06-23 20:37 ` [PATCH 2/2] linux: statvfs: allocate spare for f_type наб
2023-06-26 13:15   ` Florian Weimer [this message]
2023-06-26 13:50     ` [PATCH 3/2] statvfs: f_type: NEWS & test наб
2023-06-26 13:58       ` Florian Weimer
2023-06-26 15:29         ` [PATCH v2 " наб
2023-06-25  6:43 ` [PATCH 1/2] hurd: statvfs: __f_type -> f_type Samuel Thibault

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=87cz1i74b2.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).