[2.6.24] Add PPC nvram ioctls to compat_ioctl
PATCH 1/1 [2.6.24] Add PPC nvram ioctls to compat_ioctl
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.
fs/compat_ioctl.c +11 -0
@@ -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
fs/compat_ioctl.c
Quoted 15 lines · Olof Johansson
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/nvramThat's the
IOC_NVRAM_SYNCcall.Signed-off-by Olof Johansson <[email protected]>fs/compat_ioctl.c +0
-0
Please don't. I have this long-term plan of getting rid of fs/compat_ioctl.c, the better answer is to convert arch/powerpc/kernel/nvram_64.c and drivers/char/generic_nvram.c from the .ioctl file_operation to .unlocked_ioctl/.compat_ioctl.
Arnd <><