Update release-README after completing the 2.43 release.
[binutils-gdb.git] / sim / testsuite / cris / c / writev2.c
blobe4904dfbdb914cd9436780a88c897a4db00e370b
1 /* Trivial test of failing writev: invalid file descriptor.
2 #progos: linux
3 */
4 #include <sys/uio.h>
5 #include <errno.h>
6 #include <stdio.h>
7 #include <stdlib.h>
9 #define X(x) {x, sizeof (x) -1}
10 struct iovec v[] = {
11 X("a"),
12 X("bcd"),
13 X("efghi"),
14 X("j"),
15 X("klmn\n"),
18 int main (void)
20 if (writev (99, v, sizeof v / sizeof (v[0])) != -1
21 /* The simulator write gives EINVAL instead of EBADF; let's
22 cope. */
23 || (errno != EBADF && errno != EINVAL))
24 abort ();
26 printf ("pass\n");
27 return 0;