[BusyBox] new libb function proposal
Tito
farmatito at tiscali.it
Sun Oct 19 14:10:09 UTC 2003
Hi,
I would propose to include this new function in libb:
void bb_xioctl(int fd, int request, void *arg, const char *s,... )
{
va_list p;
if (ioctl(fd, request, arg) < 0)
{
va_start(p, s);
bb_vperror_msg(s, p);
va_end(p);
exit(bb_default_error_retval);
}
}
as code like:
if (ioctl(fd, VT_ACTIVATE, num))
bb_perror_msg_and_die("VT_ACTIVATE");
is common in many busybox applets and so some bytes could be saved.
All opinions about it are welcome!!!!!
Thanks for your time and ciao,
Tito
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bb_ioctl.c
Type: text/x-csrc
Size: 1261 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20031019/a86c696a/attachment.c
More information about the busybox
mailing list