1 // RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
6 #include <sys/statvfs.h>
14 void test_statvfs1() {
18 int rv
= statvfs1("/etc/fstab", &buf
, ST_WAIT
);
21 printf("fstypename='%s'\n", buf
.f_fstypename
);
22 printf("mntonname='%s'\n", buf
.f_mntonname
);
23 printf("mntfromname='%s'\n", buf
.f_mntfromname
);
26 void test_fstatvfs1() {
27 printf("fstatvfs1\n");
29 int fd
= open("/etc/fstab", O_RDONLY
);
33 int rv
= fstatvfs1(fd
, &buf
, ST_WAIT
);
36 printf("fstypename='%s'\n", buf
.f_fstypename
);
37 printf("mntonname='%s'\n", buf
.f_mntonname
);
38 printf("mntfromname='%s'\n", buf
.f_mntfromname
);
49 // CHECK: fstypename='{{.*}}'
50 // CHECK: mntonname='{{.*}}'
51 // CHECK: mntfromname='{{.*}}'
53 // CHECK: fstypename='{{.*}}'
54 // CHECK: mntonname='{{.*}}'
55 // CHECK: mntfromname='{{.*}}'