2 * Copyright (c) 2016-2019 The strace developers.
5 * SPDX-License-Identifier: GPL-2.0-or-later
19 static const char sample[] = "access_sample";
21 long rc = syscall(__NR_access, sample, F_OK);
22 printf("access(\"%s\", F_OK) = %ld %s (%m)\n",
23 sample, rc, errno2name());
25 rc = syscall(__NR_access, sample, R_OK|W_OK|X_OK);
26 printf("access(\"%s\", R_OK|W_OK|X_OK) = %ld %s (%m)\n",
27 sample, rc, errno2name());
29 puts("+++ exited with 0 +++");
35 SKIP_MAIN_UNDEFINED("__NR_access")