All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [2.6.24] Add PPC nvram ioctls to compat_ioctl
@ 2007-12-31 22:45 Olof Johansson
  2008-01-02  0:34 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Olof Johansson @ 2007-12-31 22:45 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev, linux-kernel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-02  0:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-31 22:45 [PATCH] [2.6.24] Add PPC nvram ioctls to compat_ioctl Olof Johansson
2008-01-02  0:34 ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.