Home
last modified time | relevance | path

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

/bootable/recovery/tests/unit/
Ddirutil_test.cpp58 struct stat sb; in TEST() local
59 ASSERT_EQ(0, stat(path.c_str(), &sb)) << strerror(errno); in TEST()
60 ASSERT_TRUE(S_ISDIR(sb.st_mode)); in TEST()
62 ASSERT_EQ(mode, sb.st_mode & mask); in TEST()
76 struct stat sb; in TEST() local
77 ASSERT_EQ(0, stat((prefix + "/a").c_str(), &sb)) << strerror(errno); in TEST()
78 ASSERT_TRUE(S_ISDIR(sb.st_mode)); in TEST()
80 ASSERT_EQ(-1, stat(path.c_str(), &sb)); in TEST()
95 struct stat sb; in TEST() local
96 ASSERT_EQ(0, stat(path.c_str(), &sb)) << strerror(errno); in TEST()
[all …]
/bootable/recovery/uncrypt/
Duncrypt.cpp263 struct stat sb; in ProductBlockMap() local
264 if (stat(path.c_str(), &sb) != 0) { in ProductBlockMap()
269 LOG(INFO) << " block size: " << sb.st_blksize << " bytes"; in ProductBlockMap()
271 int blocks = ((sb.st_size - 1) / sb.st_blksize) + 1; in ProductBlockMap()
272 LOG(INFO) << " file size: " << sb.st_size << " bytes, " << blocks << " blocks"; in ProductBlockMap()
277 static_cast<int64_t>(sb.st_size), in ProductBlockMap()
278 static_cast<int64_t>(sb.st_blksize)); in ProductBlockMap()
286 buffers.resize(WINDOW_SIZE, std::vector<unsigned char>(sb.st_blksize)); in ProductBlockMap()
334 while (pos < sb.st_size) { in ProductBlockMap()
336 int progress = static_cast<int>(100 * (double(pos) / double(sb.st_size))); in ProductBlockMap()
[all …]
/bootable/recovery/fuse_sideload/
Dfuse_provider.cpp34 struct stat sb; in FuseFileDataProvider() local
35 if (stat(path.c_str(), &sb) == -1) { in FuseFileDataProvider()
45 file_size_ = sb.st_size; in FuseFileDataProvider()
/bootable/recovery/minadbd/
Dminadbd_services_test.cpp79 struct stat sb; in WaitForFusePath() local
80 if (stat(package_path_.c_str(), &sb) == 0) { in WaitForFusePath()
93 struct stat sb; in StatExitFlagAndExitProcess() local
94 if (stat(exit_flag_.c_str(), &sb) != 0) { in StatExitFlagAndExitProcess()
152 struct stat sb; in TEST_F() local
153 ASSERT_EQ(0, stat(exit_flag_.c_str(), &sb)); in TEST_F()
/bootable/recovery/tests/component/
Dsideload_test.cpp85 struct stat sb; in TEST() local
86 if (stat(package.c_str(), &sb) == 0) { in TEST()
102 struct stat sb; in TEST() local
103 ASSERT_EQ(0, stat(exit_flag.c_str(), &sb)); in TEST()
Dinstall_test.cpp213 struct stat sb; in TEST() local
214 ASSERT_EQ(0, stat(binary_path.c_str(), &sb)); in TEST()
215 ASSERT_EQ(static_cast<mode_t>(0755), sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)); in TEST()
226 sb = {}; in TEST()
227 ASSERT_EQ(0, stat(binary_path.c_str(), &sb)); in TEST()
228 ASSERT_EQ(static_cast<mode_t>(0755), sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)); in TEST()
/bootable/recovery/otautil/
Ddirutil.cpp34 struct stat sb; in dir_status() local
35 if (stat(path.c_str(), &sb) == 0) { in dir_status()
37 if (S_ISDIR(sb.st_mode)) { in dir_status()
Dsysutil.cpp101 struct stat sb; in MapFD() local
102 if (fstat(fd, &sb) == -1) { in MapFD()
107 void* memPtr = mmap(nullptr, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in MapFD()
109 PLOG(ERROR) << "mmap(" << sb.st_size << ", R, PRIVATE, " << fd << ", 0) failed"; in MapFD()
114 length = sb.st_size; in MapFD()
116 ranges_.emplace_back(MappedRange{ memPtr, static_cast<size_t>(sb.st_size) }); in MapFD()
Dlogging.cpp277 struct stat sb; in ReadLogFilesToMemory() local
278 if (stat(path.c_str(), &sb) != 0) { in ReadLogFilesToMemory()
283 size_t read_size = std::min<size_t>(sb.st_size, 1 << 19); in ReadLogFilesToMemory()
292 log_files.emplace_back(saved_log_file{ path, sb, data }); in ReadLogFilesToMemory()
312 if (!android::base::WriteStringToFile(log.data, log.name, log.sb.st_mode, log.sb.st_uid, in RestoreLogFilesAfterFormat()
313 log.sb.st_gid)) { in RestoreLogFilesAfterFormat()
/bootable/recovery/install/
Dfuse_sdcard_install.cpp174 struct stat sb; in ApplyFromSdcard() local
175 if (stat(FUSE_SIDELOAD_HOST_PATHNAME, &sb) == -1) { in ApplyFromSdcard()
194 struct stat sb; in ApplyFromSdcard() local
195 stat(FUSE_SIDELOAD_HOST_EXIT_PATHNAME, &sb); in ApplyFromSdcard()
/bootable/recovery/otautil/include/otautil/
Dlogging.h35 struct stat sb; member
/bootable/recovery/updater/
Dblockimg.cpp756 struct stat sb; in LoadStash() local
757 if (stat(fn.c_str(), &sb) == -1) { in LoadStash()
767 if ((sb.st_size % BLOCKSIZE) != 0) { in LoadStash()
768 LOG(ERROR) << fn << " size " << sb.st_size << " not multiple of block size " << BLOCKSIZE; in LoadStash()
779 allocate(sb.st_size, buffer); in LoadStash()
781 if (!android::base::ReadFully(fd, buffer->data(), sb.st_size)) { in LoadStash()
783 PLOG(ERROR) << "Failed to read " << sb.st_size << " bytes of data"; in LoadStash()
787 size_t blocks = sb.st_size / BLOCKSIZE; in LoadStash()
819 struct stat sb; in WriteStash() local
820 int res = stat(cn.c_str(), &sb); in WriteStash()
[all …]
Ddynamic_partitions.cpp354 struct stat sb; in UpdateDynamicPartitionsFn() local
355 int result = stat(updated_marker.c_str(), &sb); in UpdateDynamicPartitionsFn()
/bootable/recovery/recovery_ui/
Dscreen_ui.cpp1075 struct stat sb; in ShowFile() local
1076 fstat(fileno(fp), &sb); in ShowFile()
1082 static_cast<int>(100 * (double(ftello(fp)) / double(sb.st_size))), in ShowFile()
1083 static_cast<int>(sb.st_size)); in ShowFile()