setfont/kbd_mode - which console?
Roy Marples
roy at marples.name
Wed Nov 5 10:45:35 UTC 2008
On Tuesday 04 November 2008 17:22:54 Bernhard Reutner-Fischer wrote:
> On Tue, Nov 04, 2008 at 04:52:42PM +0000, Roy Marples wrote:
> >On Tuesday 04 November 2008 15:46:56 Bernhard Reutner-Fischer wrote:
> >> Given these stats you should add a
> >> get_console_fd_from_name_or_die(const char *dev) instead of adding
> >> penalties for the NULL arg everywhere.
> >
> >That saves a futher 30 bytes.
> >
> >+int FAST_FUNC get_console_fd_from_name_or_die(const char *device)
> >+{
> >+ int fd;
> >+
> >+ fd = open_a_console(device);
> >+ if (fd != -1)
> >+ return fd;
>
> you don't sanity-check the KDGKBTYPE..
I didn't check the input either.
uberlaptop busybox-1.12.1 # ./sc*/blo* ../*orig/busybox ./busybox
function old new delta
get_console_fd_from_name_or_die - 107 +107
.rodata 163385 163433 +48
packed_usage 24130 24151 +21
kbd_mode_main 223 241 +18
setfont_main 194 208 +14
loadfont_main 103 117 +14
static.KD_xxx 5 7 +2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 6/0 up/down: 224/0) Total: 224 bytes
Bit more bloaty, but more correct.
/me sighs
Thanks
Roy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: console.diff
Type: text/x-patch
Size: 5086 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20081105/a710468e/attachment-0002.bin
More information about the busybox
mailing list