From: Olof Johansson <olof@lixom•net>
To: paulus@samba•org
Cc: linuxppc-dev@ozlabs•org, linux-kernel@vger•kernel.org
Subject: [PATCH] [2.6.24] Add PPC nvram ioctls to compat_ioctl
Date: Mon, 31 Dec 2007 16:45:58 -0600 [thread overview]
Message-ID: <20071231224558.GA16517@lixom.net> (raw)
Fix the following console warning when running 'nvsetenv', and makes
setting of new variables work again:
ioctl32(nvsetenv:4022): Unknown cmd fd(3) cmd(20007043){t:'p';sz:0}
arg(00000003) on /dev/nvram
That's the IOC_NVRAM_SYNC call.
Signed-off-by: Olof Johansson <olof@lixom•net>
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index e8b7c3a..7be6765 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -113,6 +113,10 @@
#include <asm/fbio.h>
#endif
+#ifdef CONFIG_PPC
+#include <asm/nvram.h>
+#endif
+
static int do_ioctl32_pointer(unsigned int fd, unsigned int cmd,
unsigned long arg, struct file *f)
{
@@ -2859,6 +2863,13 @@ IGNORE_IOCTL(FBIOGETCMAP32)
IGNORE_IOCTL(FBIOSCURSOR32)
IGNORE_IOCTL(FBIOGCURSOR32)
#endif
+
+#ifdef CONFIG_PPC
+/* PPC-specific NVRAM IOCTLs */
+COMPATIBLE_IOCTL(OBSOLETE_PMAC_NVRAM_GET_OFFSET)
+COMPATIBLE_IOCTL(IOC_NVRAM_GET_OFFSET)
+COMPATIBLE_IOCTL(IOC_NVRAM_SYNC)
+#endif
};
#define IOCTL_HASHSIZE 256
next reply other threads:[~2007-12-31 22:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-31 22:45 Olof Johansson [this message]
2008-01-02 0:34 ` [PATCH] [2.6.24] Add PPC nvram ioctls to compat_ioctl Arnd Bergmann
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=20071231224558.GA16517@lixom.net \
--to=olof@lixom$(echo .)net \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=paulus@samba$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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