[PATCH 7/8] add and use xopen_nonblocking (-18b)
Stefan Seyfried
stefan.seyfried at googlemail.com
Tue Oct 27 16:51:22 UTC 2009
Hi,
On Mon, 26 Oct 2009 23:27:08 +0100
Bernhard Reutner-Fischer <rep.dot.nop at gmail.com> wrote:
> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
> index aaf9989..ce82860 100644
> --- a/libbb/xfuncs_printf.c
> +++ b/libbb/xfuncs_printf.c
> @@ -140,6 +140,15 @@ int FAST_FUNC xopen(const char *pathname, int
> flags) return xopen3(pathname, flags, 0666);
> }
>
> +/* Die if we can't open an existing file readonly with O_NONBLOCKING
> and
> + * return the fd.
> + * Note that for ioctl O_RDONLY is sufficient.
I'd say that the comment is misleading - I am quite sure that there are
ioctls that need opening the device RW. I'd just drop it.
> + */
> +int FAST_FUNC xopen_nonblocking(const char *pathname)
> +{
> + return xopen(pathname, O_RDONLY | O_NONBLOCK);
> +}
> +
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
More information about the busybox
mailing list