From: Jeff Layton <jlayton@kernel.org>
To: Christian Brauner <brauner@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Jeff Layton <jlayton@kernel.org>
Subject: [PATCH] samples/vfs: add __SANE_USERSPACE_TYPES__ to mountinfo program
Date: Thu, 19 Dec 2024 17:11:40 -0500 [thread overview]
Message-ID: <20241219-statmount-v1-1-9fd8eab3cf0c@kernel.org> (raw)
mountinfo.c is throwing compiler warnings on ppc64. The comment over
__SANE_USERSPACE_TYPES__ says:
* This is here because we used to use l64 for 64bit powerpc
* and we don't want to impact user mode with our change to ll64
* in the kernel.
*
* However, some user programs are fine with this. They can
* flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
That is the case with mountinfo.c, so define it.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20241211143701.5cfc95a7@canb.auug.org.au/
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Feel free to fold this into an earlier patch if that's easier. Also, I
wonder if samples/vfs/test-list-all-mounts.c needs similar treatment?
---
samples/vfs/mountinfo.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/samples/vfs/mountinfo.c b/samples/vfs/mountinfo.c
index 349aaade4de53912b96eadb35bf1b7457b4b04fa..2b17d244d321ee759543cefa3c9e84e7cd489c9a 100644
--- a/samples/vfs/mountinfo.c
+++ b/samples/vfs/mountinfo.c
@@ -5,6 +5,7 @@
* contents of /proc/self/mountinfo.
*/
#define _GNU_SOURCE
+#define __SANE_USERSPACE_TYPES__
#include <stdio.h>
#include <stdint.h>
#include <sys/ioctl.h>
---
base-commit: ef5bbd2a286805b0f97b5fa8616d28a84336ee7b
change-id: 20241219-statmount-002351a3aa68
Best regards,
--
Jeff Layton <jlayton@kernel.org>
next reply other threads:[~2024-12-19 22:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 22:11 Jeff Layton [this message]
2024-12-22 10:47 ` [PATCH] samples/vfs: add __SANE_USERSPACE_TYPES__ to mountinfo program Christian Brauner
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=20241219-statmount-v1-1-9fd8eab3cf0c@kernel.org \
--to=jlayton@kernel.org \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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