Searched refs:sbuf (Results 1 – 3 of 3) sorted by relevance
161 struct stat sbuf; in CorruptFile() local162 if (stat(fname.c_str(), &sbuf) != 0) { in CorruptFile()169 if (-offset > sbuf.st_size) { in CorruptFile()172 offset = static_cast<int>(sbuf.st_size + offset); in CorruptFile()175 if (offset > sbuf.st_size) { in CorruptFile()176 offset = static_cast<int>(sbuf.st_size); in CorruptFile()178 if (offset + bytes_to_corrupt > sbuf.st_size) { in CorruptFile()179 bytes_to_corrupt = static_cast<int>(sbuf.st_size - offset); in CorruptFile()
25 struct stat sbuf; in GetAllocatedFileSize() local26 int err = stat(file_name.c_str(), &sbuf); in GetAllocatedFileSize()28 return sbuf.st_blocks * 512; in GetAllocatedFileSize()
671 struct stat sbuf; in GetFileSize() local672 if (stat(fname.c_str(), &sbuf) != 0) { in GetFileSize()676 *size = sbuf.st_size; in GetFileSize()868 struct statvfs sbuf; in GetFreeSpace() local870 if (statvfs(fname.c_str(), &sbuf) < 0) { in GetFreeSpace()874 *free_space = ((uint64_t)sbuf.f_bsize * sbuf.f_bfree); in GetFreeSpace()