Home
last modified time | relevance | path

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

/bionic/tests/
Dsys_vfs_test.cpp29 template <typename StatFsT> void Check(StatFsT& sb) { in Check() argument
30 EXPECT_EQ(getpagesize(), static_cast<int>(sb.f_bsize)); in Check()
31 EXPECT_EQ(0U, sb.f_bfree); in Check()
32 EXPECT_EQ(0U, sb.f_ffree); in Check()
33 EXPECT_EQ(255, static_cast<int>(sb.f_namelen)); in Check()
36 if (sb.f_fsid.__val[0] != 0U) { in Check()
40 EXPECT_EQ(static_cast<int>(proc_sb.st_dev), sb.f_fsid.__val[0]); in Check()
41 EXPECT_EQ(0, sb.f_fsid.__val[1]); in Check()
44 EXPECT_EQ(0, sb.f_fsid.__val[0]); in Check()
45 EXPECT_EQ(0, sb.f_fsid.__val[1]); in Check()
[all …]
Dsys_statvfs_test.cpp27 template <typename StatVfsT> void Check(StatVfsT& sb) { in Check() argument
28 EXPECT_EQ(getpagesize(), 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(255U, sb.f_namemax); in Check()
34 if (sb.f_fsid != 0U) { in Check()
38 EXPECT_EQ(proc_sb.st_dev, sb.f_fsid); in Check()
41 EXPECT_EQ(0U, sb.f_fsid); in Check()
47 EXPECT_TRUE((sb.f_flag & ST_VALID) == 0) << sb.f_flag; in Check()
51 struct statvfs sb; in TEST() local
[all …]
Dftw_test.cpp54 void smoke_test_ftw(const char* fpath, const struct stat* sb, int tflag) { in smoke_test_ftw() argument
56 ASSERT_TRUE(sb != nullptr); in smoke_test_ftw()
61 struct stat sb; in smoke_test_ftw() local
62 EXPECT_EQ(-1, stat(fpath, &sb)); in smoke_test_ftw()
67 if (S_ISDIR(sb->st_mode)) { in smoke_test_ftw()
73 } else if (S_ISLNK(sb->st_mode)) { in smoke_test_ftw()
80 void smoke_test_nftw(const char* fpath, const struct stat* sb, int tflag, FTW* ftwbuf) { in smoke_test_nftw() argument
81 smoke_test_ftw(fpath, sb, tflag); in smoke_test_nftw()
85 int check_ftw(const char* fpath, const struct stat* sb, int tflag) { in check_ftw() argument
86 smoke_test_ftw(fpath, sb, tflag); in check_ftw()
[all …]
Dsys_stat_test.cpp49 struct stat sb; in TEST() local
50 ASSERT_EQ(0, fstat(fd, &sb)); in TEST()
51 ASSERT_EQ(times[0].tv_sec, static_cast<long>(sb.st_atime)); in TEST()
52 ASSERT_EQ(times[1].tv_sec, static_cast<long>(sb.st_mtime)); in TEST()
89 struct stat sb; in TEST() local
90 ASSERT_EQ(0, stat(path.c_str(), &sb)); in TEST()
91 ASSERT_TRUE(S_ISFIFO(sb.st_mode)); in TEST()
100 struct stat64 sb; in TEST() local
101 ASSERT_EQ(0, stat64("/proc/version", &sb)); in TEST()
102 ASSERT_EQ(0, lstat64("/proc/version", &sb)); in TEST()
[all …]
Dfcntl_test.cpp135 struct stat sb; in TEST() local
136 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
137 ASSERT_EQ(0, sb.st_size); in TEST()
141 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
142 ASSERT_EQ(1, sb.st_size); in TEST()
145 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
146 ASSERT_EQ(2, sb.st_size); in TEST()
150 ASSERT_EQ(0, fstat(tf.fd, &sb)); in TEST()
151 ASSERT_EQ(3, sb.st_size); in TEST()
154 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.cpp150 struct stat sb; in TEST() local
151 int rc = fstat(fd, &sb); in TEST()
153 ASSERT_EQ(sb.st_mode & 0777, 0600U); in TEST()
2486 struct stat sb; in TEST() local
2490 ASSERT_EQ(-1, lstat(tf.path, &sb)); in TEST()
2495 ASSERT_EQ(-1, lstat(td.path, &sb)); in TEST()
2799 struct stat sb; in TEST() local
2800 ASSERT_EQ(0, stat(old_path.c_str(), &sb)); in TEST()
2801 ASSERT_EQ(-1, stat(new_path.c_str(), &sb)); in TEST()
2805 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.cpp508 struct stat sb; in TEST_F() local
509 ASSERT_FALSE(stat(PROP_DIRNAME, &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.cpp138 struct statfs sb; in pathconf() local
139 if (statfs(path, &sb) == -1) { in pathconf()
142 return __pathconf(sb, name); in pathconf()
146 struct statfs sb; in fpathconf() local
147 if (fstatfs(fd, &sb) == -1) { in fpathconf()
150 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.h57 #define BFS_UNCLEAN(bfs_sb,sb) ((le32_to_cpu(bfs_sb->s_from) != - 1) && (le32_to_cpu(bfs_sb->s_to) … argument
/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()
/bionic/libc/arch-riscv64/string/
Dstrncat_v.S112 sb zero, (pDstPtr)