repo.or.cz
/
binutils-gdb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Update release-README after completing the 2.43 release.
[binutils-gdb.git]
/
sim
/
testsuite
/
cris
/
c
/
stat7.c
blob
d61bd8e0c7db8af340496b2f5d048c7af54ece17
1
/*
2
#progos: linux
3
*/
4
5
#include <sys/types.h>
6
#include <sys/stat.h>
7
#include <unistd.h>
8
#include <stdio.h>
9
#include <errno.h>
10
#include <stdlib.h>
11
12
int
main
(
void
)
13
{
14
struct
stat buf
;
15
16
/* From Linux, we get EFAULT. The simulator sends us EINVAL. */
17
if
(
lstat
(
NULL
, &
buf
) != -
1
18
|| (
errno
!=
EINVAL
&&
errno
!=
EFAULT
))
19
{
20
perror
(
"lstat 1"
);
21
abort
();
22
}
23
24
printf
(
"pass
\n
"
);
25
exit
(
0
);
26
}