[rfc] xioctl()

Bernhard Fischer rep.dot.nop at gmail.com
Sat Jun 23 21:00:06 UTC 2007


On Sat, Jun 23, 2007 at 10:21:54PM +0200, Tito wrote:
>static void xioctl(int fd, int request, void *argp, ...)
> {
> 	va_list p;
> 	char *string;
> 	va_start(p, argp);
> 	string = va_arg(va_list p,  (char *));
> 	
> 	int e = ioctl(fd, request, argp);
> 	if (e)
> 		bb_perror_msg_and_die(" %s", (string) ? string : "ioctl");
> 	va_end(p);
>  }

well, we only need the va_stuff if (e), i'd say. No?

cheers,



More information about the busybox mailing list