Searched defs:sb (Results 1 - 17 of 17) sorted by path

/bionic/libc/bionic/
H A Ddirent.cpp78 struct stat sb; local
79 if (fstat(fd, &sb) == -1) {
82 if (!S_ISDIR(sb.st_mode)) {
H A Dfts.c799 struct stat *sbp, sb; local
810 sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
1028 struct stat sb; local
1035 if (fstat(newfd, &sb)) {
1039 if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
H A Dlstat.cpp34 int lstat(const char* path, struct stat* sb) { argument
35 return fstatat(AT_FDCWD, path, sb, AT_SYMLINK_NOFOLLOW);
H A Dpathconf.cpp143 struct statfs sb; local
144 if (statfs(path, &sb) == -1) {
147 return __pathconf(sb, name);
151 struct statfs sb; local
152 if (fstatfs(fd, &sb) == -1) {
155 return __pathconf(sb, name);
H A Dstat.cpp34 int stat(const char* path, struct stat* sb) { argument
35 return fstatat(AT_FDCWD, path, sb, 0);
H A Dtmpfile.cpp80 struct stat sb; local
81 int rc = fstat(fd, &sb);
/bionic/libc/upstream-freebsd/lib/libc/stdlib/
H A Drealpath.c53 struct stat sb; local
164 if (lstat(resolved, &sb) != 0) {
169 if (S_ISLNK(sb.st_mode)) {
220 } else if (!S_ISDIR(sb.st_mode) && p != NULL) {
/bionic/libc/upstream-openbsd/lib/libc/stdio/
H A Dmktemp.c50 struct stat sb; local
92 if (lstat(path, &sb) != 0)
/bionic/tests/
H A Dfcntl_test.cpp118 struct stat sb; local
119 ASSERT_EQ(0, fstat(tf.fd, &sb));
120 ASSERT_EQ(0, sb.st_size);
124 ASSERT_EQ(0, fstat(tf.fd, &sb));
125 ASSERT_EQ(1, sb.st_size);
128 ASSERT_EQ(0, fstat(tf.fd, &sb));
129 ASSERT_EQ(2, sb.st_size);
133 ASSERT_EQ(0, fstat(tf.fd, &sb));
134 ASSERT_EQ(3, sb.st_size);
137 ASSERT_EQ(0, fstat(tf.fd, &sb));
[all...]
H A Dftw_test.cpp50 void sanity_check_ftw(const char* fpath, const struct stat* sb, int tflag) { argument
52 ASSERT_TRUE(sb != NULL);
54 if (S_ISDIR(sb->st_mode)) {
56 } else if (S_ISLNK(sb->st_mode)) {
63 void sanity_check_nftw(const char* fpath, const struct stat* sb, int tflag, struct FTW* ftwbuf) { argument
64 sanity_check_ftw(fpath, sb, tflag);
68 int check_ftw(const char* fpath, const struct stat* sb, int tflag) { argument
69 sanity_check_ftw(fpath, sb, tflag);
73 int check_ftw64(const char* fpath, const struct stat64* sb, int tflag) { argument
74 sanity_check_ftw(fpath, reinterpret_cast<const struct stat*>(sb), tfla
78 check_nftw(const char* fpath, const struct stat* sb, int tflag, struct FTW* ftwbuf) argument
83 check_nftw64(const char* fpath, const struct stat64* sb, int tflag, struct FTW* ftwbuf) argument
[all...]
H A Dstdio_test.cpp64 struct stat sb; local
65 int rc = fstat(fd, &sb);
67 ASSERT_EQ(sb.st_mode & 0777, 0600U);
305 snprintf(buf, sizeof(buf), "a%sb", "01234");
309 snprintf(buf, sizeof(buf), "a%sb", s);
H A Dstdlib_test.cpp264 struct stat64 sb; local
265 ASSERT_EQ(0, fstat64(tf.fd, &sb));
271 struct stat sb; local
272 ASSERT_EQ(0, fstat(tf.fd, &sb));
H A Dsys_stat_test.cpp40 struct stat sb; local
41 ASSERT_EQ(0, fstat(fd, &sb));
42 ASSERT_EQ(times[0].tv_sec, static_cast<long>(sb.st_atime));
43 ASSERT_EQ(times[1].tv_sec, static_cast<long>(sb.st_mtime));
80 struct stat sb; local
81 ASSERT_EQ(0, stat(path.c_str(), &sb));
82 ASSERT_TRUE(S_ISFIFO(sb.st_mode));
91 struct stat64 sb; local
92 ASSERT_EQ(0, stat64("/proc/version", &sb));
93 ASSERT_EQ(0, lstat64("/proc/version", &sb));
142 struct stat sb; local
199 struct stat sb; local
[all...]
H A Dsys_statvfs_test.cpp27 template <typename StatVfsT> void Check(StatVfsT& sb) { argument
28 EXPECT_EQ(4096U, sb.f_bsize);
29 EXPECT_EQ(0U, sb.f_bfree);
30 EXPECT_EQ(0U, sb.f_ffree);
31 EXPECT_EQ(0U, sb.f_fsid);
32 EXPECT_EQ(255U, sb.f_namemax);
37 EXPECT_TRUE((sb.f_flag & ST_VALID) == 0) << sb.f_flag;
41 struct statvfs sb; local
42 ASSERT_EQ(0, statvfs("/proc", &sb));
47 struct statvfs64 sb; local
53 struct statvfs sb; local
61 struct statvfs64 sb; local
[all...]
H A Dsys_vfs_test.cpp27 template <typename StatFsT> void Check(StatFsT& sb) { argument
28 EXPECT_EQ(4096, static_cast<int>(sb.f_bsize));
29 EXPECT_EQ(0U, sb.f_bfree);
30 EXPECT_EQ(0U, sb.f_ffree);
31 EXPECT_EQ(0, sb.f_fsid.__val[0]);
32 EXPECT_EQ(0, sb.f_fsid.__val[1]);
33 EXPECT_EQ(255, static_cast<int>(sb.f_namelen));
38 EXPECT_TRUE((sb.f_flags & ST_VALID) == 0) << sb.f_flags;
42 struct statfs sb; local
48 struct statfs64 sb; local
54 struct statfs sb; local
62 struct statfs64 sb; local
[all...]
H A Dsystem_properties_test.cpp404 struct stat sb; local
405 if (stat(PROP_FILENAME, &sb) == -1 && errno == ENOENT) {
H A Dunistd_test.cpp159 struct stat sb; local
160 ASSERT_EQ(0, stat(tf.filename, &sb));
161 ASSERT_EQ(123, sb.st_size);
169 struct stat sb; local
170 ASSERT_EQ(0, stat(tf.filename, &sb));
171 ASSERT_EQ(123, sb.st_size);
179 struct stat sb; local
180 ASSERT_EQ(0, stat(tf.filename, &sb));
181 ASSERT_EQ(123, sb.st_size);
189 struct stat sb; local
[all...]

Completed in 322 milliseconds