blob: a084cf337400d7d9a58f298d80025cc4c5a7062f [file] [log] [blame]
Fei Jied82b0d82016-03-31 16:06:52 +08001#include "tests.h"
Dmitry V. Levin6a2f43c2016-08-09 14:38:29 +00002#include <asm/unistd.h>
Fei Jied82b0d82016-03-31 16:06:52 +08003
4#ifdef __NR_chroot
5
Fei Jied82b0d82016-03-31 16:06:52 +08006# include <stdio.h>
7# include <unistd.h>
8
9int
10main(void)
11{
12 static const char sample[] = "chroot.sample";
Dmitry V. Levinadbbc2d2016-04-21 20:30:25 +000013
14 long rc = syscall(__NR_chroot, sample);
15 printf("chroot(\"%s\") = %ld %s (%m)\n",
16 sample, rc, errno2name());
Fei Jied82b0d82016-03-31 16:06:52 +080017
18 puts("+++ exited with 0 +++");
19 return 0;
20}
21
22#else
23
24SKIP_MAIN_UNDEFINED("__NR_chroot")
25
26#endif