Home
last modified time | relevance | path

Searched refs:sb (Results 1 – 20 of 20) sorted by relevance

/bionic/tests/
Dsys_vfs_test.cpp27 template <typename StatFsT> void Check(StatFsT& sb) { in Check() argument
28 EXPECT_EQ(4096, static_cast<int>(sb.f_bsize)); in Check()
29 EXPECT_EQ(0U, sb.f_bfree); in Check()
30 EXPECT_EQ(0U, sb.f_ffree); in Check()
31 EXPECT_EQ(0, sb.f_fsid.__val[0]); in Check()
32 EXPECT_EQ(0, sb.f_fsid.__val[1]); in Check()
33 EXPECT_EQ(255, static_cast<int>(sb.f_namelen)); in Check()
38 EXPECT_TRUE((sb.f_flags & ST_VALID) == 0) << sb.f_flags; in Check()
42 struct statfs sb; in TEST() local
43 ASSERT_EQ(0, statfs("/proc", &sb)); in TEST()
[all …]
Dsys_statvfs_test.cpp27 template <typename StatVfsT> void Check(StatVfsT& sb) { in Check() argument
28 EXPECT_EQ(4096U, sb.f_bsize); in Check()
29 EXPECT_EQ(0U, sb.f_bfree); in Check()
30 EXPECT_EQ(0U, sb.f_ffree); in Check()
31 EXPECT_EQ(0U, sb.f_fsid); in Check()
32 EXPECT_EQ(255U, sb.f_namemax); in Check()
37 EXPECT_TRUE((sb.f_flag & ST_VALID) == 0) << sb.f_flag; in Check()
41 struct statvfs sb; in TEST() local
42 ASSERT_EQ(0, statvfs("/proc", &sb)); in TEST()
43 Check(sb); in TEST()
[all …]
Dftw_test.cpp52 void smoke_test_ftw(const char* fpath, const struct stat* sb, int tflag) { in smoke_test_ftw() argument
54 ASSERT_TRUE(sb != nullptr); in smoke_test_ftw()
59 struct stat sb; in smoke_test_ftw() local
60 EXPECT_EQ(-1, stat(fpath, &sb)); in smoke_test_ftw()
65 if (S_ISDIR(sb->st_mode)) { in smoke_test_ftw()
71 } else if (S_ISLNK(sb->st_mode)) { in smoke_test_ftw()
78 void smoke_test_nftw(const char* fpath, const struct stat* sb, int tflag, FTW* ftwbuf) { in smoke_test_nftw() argument
79 smoke_test_ftw(fpath, sb, tflag); in smoke_test_nftw()
83 int check_ftw(const char* fpath, const struct stat* sb, int tflag) { in check_ftw() argument
84 smoke_test_ftw(fpath, sb, tflag); in check_ftw()
[all …]
Dsys_stat_test.cpp47 struct stat sb; in TEST() local
48 ASSERT_EQ(0, fstat(fd, &sb)); in TEST()
49 ASSERT_EQ(times[0].tv_sec, static_cast<long>(sb.st_atime)); in TEST()
50 ASSERT_EQ(times[1].tv_sec, static_cast<long>(sb.st_mtime)); in TEST()
87 struct stat sb; in TEST() local
88 ASSERT_EQ(0, stat(path.c_str(), &sb)); in TEST()
89 ASSERT_TRUE(S_ISFIFO(sb.st_mode)); in TEST()
98 struct stat64 sb; in TEST() local
99 ASSERT_EQ(0, stat64("/proc/version", &sb)); in TEST()
100 ASSERT_EQ(0, lstat64("/proc/version", &sb)); in TEST()
[all …]
Dfcntl_test.cpp133 struct stat sb; in TEST() local
134 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
135 ASSERT_EQ(0, sb.st_size); in TEST()
139 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
140 ASSERT_EQ(1, sb.st_size); in TEST()
143 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
144 ASSERT_EQ(2, sb.st_size); in TEST()
148 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
149 ASSERT_EQ(3, sb.st_size); in TEST()
152 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
[all …]
Dunistd_test.cpp181 struct stat sb; in TEST() local
182 ASSERT_EQ(0, stat(tf.path, &sb)); in TEST()
183 ASSERT_EQ(123, sb.st_size); in TEST()
191 struct stat sb; in TEST() local
192 ASSERT_EQ(0, stat(tf.path, &sb)); in TEST()
193 ASSERT_EQ(123, sb.st_size); in TEST()
201 struct stat sb; in TEST() local
202 ASSERT_EQ(0, stat(tf.path, &sb)); in TEST()
203 ASSERT_EQ(123, sb.st_size); in TEST()
211 struct stat sb; in TEST() local
[all …]
Dstdio_test.cpp126 struct stat sb; in TEST() local
127 int rc = fstat(fd, &sb); in TEST()
129 ASSERT_EQ(sb.st_mode & 0777, 0600U); in TEST()
2438 struct stat sb; in TEST() local
2442 ASSERT_EQ(-1, lstat(tf.path, &sb)); in TEST()
2447 ASSERT_EQ(-1, lstat(td.path, &sb)); in TEST()
2745 struct stat sb; in TEST() local
2746 ASSERT_EQ(0, stat(old_path.c_str(), &sb)); in TEST()
2747 ASSERT_EQ(-1, stat(new_path.c_str(), &sb)); in TEST()
2751 ASSERT_EQ(-1, stat(old_path.c_str(), &sb)); in TEST()
[all …]
Dstdlib_test.cpp471 struct stat64 sb; in TEST() local
472 ASSERT_EQ(0, fstat64(tf.fd, &sb)); in TEST()
478 struct stat sb; in TEST() local
479 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
Dsystem_properties_test.cpp434 struct stat sb; in TEST_F() local
435 ASSERT_FALSE(stat(PROP_FILENAME, &sb) == -1 && errno == ENOENT); in TEST_F()
/bionic/libc/bionic/
Drealpath.cpp58 struct stat sb; in realpath() local
59 if (fstat(fd.get(), &sb) == -1) return nullptr; in realpath()
60 dev_t st_dev = sb.st_dev; in realpath()
61 ino_t st_ino = sb.st_ino; in realpath()
72 if (stat(dst, &sb) == -1 || st_dev != sb.st_dev || st_ino != sb.st_ino) { in realpath()
Dpathconf.cpp143 struct statfs sb; in pathconf() local
144 if (statfs(path, &sb) == -1) { in pathconf()
147 return __pathconf(sb, name); in pathconf()
151 struct statfs sb; in fpathconf() local
152 if (fstatfs(fd, &sb) == -1) { in fpathconf()
155 return __pathconf(sb, name); in fpathconf()
Dstat.cpp34 int stat(const char* path, struct stat* sb) { in stat() argument
35 return fstatat(AT_FDCWD, path, sb, 0); in stat()
Dlstat.cpp34 int lstat(const char* path, struct stat* sb) { in lstat() argument
35 return fstatat(AT_FDCWD, path, sb, AT_SYMLINK_NOFOLLOW); in lstat()
Dtmpfile.cpp75 struct stat sb; in __tmpfile_dir_legacy() local
76 if (fstat(fd, &sb) == -1) { in __tmpfile_dir_legacy()
Ddirent.cpp90 struct stat sb; in fdopendir() local
91 if (fstat(fd, &sb) == -1) { in fdopendir()
94 if (!S_ISDIR(sb.st_mode)) { in fdopendir()
Dfts.c798 struct stat *sbp, sb; in fts_stat() local
809 sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; in fts_stat()
1025 struct stat sb; in fts_safe_changedir() local
1032 if (fstat(newfd, &sb) == -1) { in fts_safe_changedir()
1036 if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) { in fts_safe_changedir()
/bionic/libc/kernel/uapi/linux/
Dbfs_fs.h69 #define BFS_UNCLEAN(bfs_sb,sb) ((le32_to_cpu(bfs_sb->s_from) != - 1) && (le32_to_cpu(bfs_sb->s_to) … argument
Dkvm.h1654 __u64 sb; member
/bionic/libc/upstream-freebsd/lib/libc/gen/
Dglob.c649 struct stat sb; in glob2() local
660 if (g_lstat(pathbuf, &sb, pglob)) in glob2()
670 (S_ISDIR(sb.st_mode) || in glob2()
671 (S_ISLNK(sb.st_mode) && in glob2()
672 g_stat(pathbuf, &sb, pglob) == 0 && in glob2()
673 S_ISDIR(sb.st_mode)))) { in glob2()
1021 g_lstat(Char *fn, struct stat *sb, glob_t *pglob) in g_lstat() argument
1030 return((*pglob->gl_lstat)(buf, sb)); in g_lstat()
1031 return (lstat(buf, sb)); in g_lstat()
1035 g_stat(Char *fn, struct stat *sb, glob_t *pglob) in g_stat() argument
[all …]
/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dmktemp.c50 struct stat sb; in mktemp_internal() local
92 if (lstat(path, &sb) != 0) in mktemp_internal()