From: Florian Weimer <fweimer@redhat.com>
To: Cyril Hrubis <metan@ucw.cz>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
libc-alpha@sourceware.org, arnd@arndb.de,
linux-api@vger.kernel.org, dhowells@redhat.com,
David.Laight@aculab.com, zack@owlfolio.org, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] uapi: Make __{u, s}64 match {u, }int64_t in userspace
Date: Tue, 21 Jun 2022 12:58:23 +0200 [thread overview]
Message-ID: <877d5a1dww.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20220621090951.29911-1-metan@ucw.cz> (Cyril Hrubis's message of "Tue, 21 Jun 2022 11:09:51 +0200")
* Cyril Hrubis:
> From: Cyril Hrubis <chrubis@suse.cz>
>
> This changes the __u64 and __s64 in userspace on 64bit platforms from
> long long (unsigned) int to just long (unsigned) int in order to match
> the uint64_t and int64_t size in userspace.
>
> This allows us to use the kernel structure definitions in userspace.
>
> For example we can use PRIu64 and PRId64 modifiers in printf() to print
> structure membere. Morever with this there would be no need to redefine
> these structures in an libc implementations as it is done now.
>
> Consider for example the newly added statx() syscall. If we use the
> header from uapi we will get warnings when attempting to print it's
> members as:
>
> printf("%" PRIu64 "\n", stx.stx_size);
>
> We get:
>
> warning: format '%lu' expects argument of type 'long unsigned int',
> but argument 5 has type '__u64' {aka 'long long unsigned int'}
>
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Could you add some motivation for the C++ condition to the commit
message?
Thanks,
Florian
prev parent reply other threads:[~2022-06-21 10:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 9:09 [PATCH v2] uapi: Make __{u,s}64 match {u,}int64_t in userspace Cyril Hrubis
2022-06-21 10:58 ` Florian Weimer [this message]
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=877d5a1dww.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=David.Laight@aculab.com \
--cc=arnd@arndb.de \
--cc=dhowells@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ltp@lists.linux.it \
--cc=metan@ucw.cz \
--cc=zack@owlfolio.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;
as well as URLs for NNTP newsgroup(s).