From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/CONTRIB/SNIP/ferrorf.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 reference/C/CONTRIB/SNIP/ferrorf.c (limited to 'reference/C/CONTRIB/SNIP/ferrorf.c') diff --git a/reference/C/CONTRIB/SNIP/ferrorf.c b/reference/C/CONTRIB/SNIP/ferrorf.c new file mode 100755 index 0000000..7bf74d1 --- /dev/null +++ b/reference/C/CONTRIB/SNIP/ferrorf.c @@ -0,0 +1,25 @@ +/* FERRORF.C +** Prints error message with printf() formatting syntax, then a colon, +** then a message corressponding to the value of errno, then a newline. +** Output is to filehandle. +** +** Public Domain by Mark R. Devlin, free usage is permitted. +*/ + +#include +#include +#include +#include + +int ferrorf(FILE *filehandle, const char *format, ...) +{ + int vfp, fp; + va_list vargs; + + vfp = fp = 0; + va_start(vargs, format); + vfp = vfprintf(filehandle, format, vargs); + va_end(vargs); + fp = fprintf(filehandle, ": %s\n", sys_errlist[errno]); + return ((vfp==EOF || fp==EOF) ? EOF : (vfp+fp)); +} -- cgit v1.2.3-54-g00ecf ck'>packet-loop-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury Norov <ynorov@caviumnetworks.com>2016-05-02 19:12:47 +0300
committerArnd Bergmann <arnd@arndb.de>2016-05-05 00:42:20 +0200
commit1f93e9f2318b598e6775a1fc9701604993c512b1 (patch)
treec27eadaa7ce0103369a55b417da07ebd5d3f9c75
parent02da2d72174c61988eb4456b53f405e3ebdebce4 (diff)
asm-generic: use compat version for preadv2 and pwritev2
Compat architectures that does not use generic unistd (mips, s390), declare compat version in their syscall tables for preadv2 and pwritev2. Generic unistd syscall table should do it as well. [arnd: this initially slipped through the review and an incorrect patch got merged. arch/tile/ is the only architecture that could be affected for their 32-bit compat mode, every other architecture we support today is fine.] Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>