pc: Unbreak ROM mapping for ISA machine
[qemu/ar7.git] / tests / cris / check_stat3.c
blob36a9d5d2744b614901835b288dbc2fc86b09c0cd
1 /* Simulator options:
2 #sim: --sysroot=@exedir@
3 */
4 #include <sys/types.h>
5 #include <sys/stat.h>
6 #include <unistd.h>
7 #include <stdio.h>
8 #include <string.h>
9 #include <stdlib.h>
11 int main (int argc, char *argv[])
13 char path[1024] = "/";
14 struct stat buf;
16 strncat(path, argv[0], sizeof(path) - 2);
17 if (stat (".", &buf) != 0
18 || !S_ISDIR (buf.st_mode))
19 abort ();
20 if (stat (path, &buf) != 0
21 || !S_ISREG (buf.st_mode))
22 abort ();
23 printf ("pass\n");
24 exit (0);