Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdio Allow vdprintf to work on non-blocking non-re...
details: https://anonhg.NetBSD.org/src/rev/df3ecbafaa63
branches: trunk
changeset: 1013480:df3ecbafaa63
user: christos <christos%NetBSD.org@localhost>
date: Fri Aug 28 22:02:24 2020 +0000
description:
Allow vdprintf to work on non-blocking non-regular files (Rob Newberry)
diffstat:
lib/libc/stdio/vdprintf.c | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
diffs (40 lines):
diff -r 9565c00cf023 -r df3ecbafaa63 lib/libc/stdio/vdprintf.c
--- a/lib/libc/stdio/vdprintf.c Fri Aug 28 21:39:56 2020 +0000
+++ b/lib/libc/stdio/vdprintf.c Fri Aug 28 22:02:24 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vdprintf.c,v 1.5 2017/01/10 17:45:12 christos Exp $ */
+/* $NetBSD: vdprintf.c,v 1.6 2020/08/28 22:02:24 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -34,12 +34,11 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vdprintf.c,v 1.5 2017/01/10 17:45:12 christos Exp $");
+__RCSID("$NetBSD: vdprintf.c,v 1.6 2020/08/28 22:02:24 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
#include <sys/types.h>
-#include <sys/stat.h>
#include <assert.h>
#include <errno.h>
@@ -89,16 +88,6 @@
return EOF;
}
- if (fdflags & O_NONBLOCK) {
- struct stat st;
- if (fstat(fd, &st) == -1)
- return -1;
- if (!S_ISREG(st.st_mode)) {
- errno = EFTYPE;
- return EOF;
- }
- }
-
_FILEEXT_SETUP(&f, &fext);
__sfpinit(&f);
f._p = buf;
Home |
Main Index |
Thread Index |
Old Index