On Thu, 26 Apr 2012 17:07:24 +0100 Bruce Dubbs <[email protected]> wrote:
> Andrew Benton wrote: > > On Thu, 26 Apr 2012 15:50:51 +0100 > > Bruce Dubbs <[email protected]> wrote: > > > >> Andrew Benton wrote: > >>> + case KDSKBLED: > >>> + if (!perm) > >>> + return -EPERM; > >>> + if (arg & ~0x77) > >>> + return -EINVAL; > >>> + spin_lock_irqsave(&kbd_event_lock, flags); > >>> + kbd->ledflagstate = (arg & 7); > >>> + kbd->default_ledflagstate = ((arg >> 4) & 7); > >>> + set_leds(); > >>> + spin_unlock_irqrestore(&kbd_event_lock, flags); > >>> + break; // <<<<< change to return 0; > > > >> It looks like an error in the code. The only case that doesn't return is > >> KDSKBLED. The break then goes to return -ENOIOCTLCMD which doesn't seem > >> right. > >> Try changing the break to return 0; > > > > Thanks, I changed it to return 0; but sadly the kernel will not compile: > > > > LD vmlinux.o > > MODPOST vmlinux.o > > GEN .version > > CHK include/generated/compile.h > > UPD include/generated/compile.h > > CC init/version.o > > LD init/built-in.o > > LD .tmp_vmlinux1 > > drivers/built-in.o: In function `do_compute_shiftstate': > > keyboard.c:(.text+0x5fe03): undefined reference to `key_maps' > > drivers/built-in.o: In function `k_slock': > > keyboard.c:(.text+0x6043c): undefined reference to `key_maps' > > drivers/built-in.o: In function `handle_diacr': > > keyboard.c:(.text+0x6048a): undefined reference to `accent_table_size' > > keyboard.c:(.text+0x60493): undefined reference to `accent_table' > > keyboard.c:(.text+0x604bc): undefined reference to `accent_table' > > There is no way that changing a 'break' command to a 'return' would result in > an > undefined reference. There is something else going on. > > Unpack the kernel and configure as normal. Then run make. Not edit the file > changing the one line and run make again. Right you are. I edited the file after I'd run make oldconfig, it must source the file in some way. This sed edits the file as you suggest and fixes the problem for me: sed -i '/ spin_u/{N;s#break#return 0#;}' drivers/tty/vt/keyboard.c Many thanks for your help with this Bruce. Andy -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
