tests/mkdirat.c: print syscall() result using %ld format

This commit is contained in:
Дмитрий Левин 2016-04-21 21:03:13 +00:00
parent 1b511d0fea
commit a175bfe445

View File

@ -4,7 +4,6 @@
#ifdef __NR_mkdirat
# include <errno.h>
# include <sys/stat.h>
# include <stdio.h>
# include <unistd.h>
@ -13,10 +12,10 @@ main(void)
{
static const char sample[] = "mkdirat.sample";
const long fd = (long) 0xdeadbeefffffffff;
int rc = syscall(__NR_mkdirat, fd, sample, 0600);
printf("mkdirat(%d, \"%s\", 0600) = %d %s (%m)\n",
(int) fd, sample, rc,
errno2name());
long rc = syscall(__NR_mkdirat, fd, sample, 0600);
printf("mkdirat(%d, \"%s\", 0600) = %ld %s (%m)\n",
(int) fd, sample, rc, errno2name());
puts("+++ exited with 0 +++");
return 0;