| 228 | |
| 229 | |
| 230 | int PS4API scek_fstat(int fd, SceKernelStat *sb) |
| 231 | { |
| 232 | LOG_SCE_TRACE("fd %d sb %p", fd, sb); |
| 233 | |
| 234 | struct stat stat; |
| 235 | int ret = fstat(fd, &stat); |
| 236 | sb->st_mode = getSceFileMode(stat.st_mode); |
| 237 | sb->st_size = stat.st_size; |
| 238 | if (stat.st_mode & _S_IFMT & _S_IFDIR) |
| 239 | { |
| 240 | // TODO |
| 241 | sb->st_blocks = 0; // UtilPath::FileCountInDirectory(pcPath); |
| 242 | sb->st_blksize = sizeof(SceKernelDirent); |
| 243 | } |
| 244 | else |
| 245 | { |
| 246 | sb->st_blocks = stat.st_size / SSD_BLOCK_SIZE + (stat.st_size % SSD_BLOCK_SIZE) ? 1 : 0; |
| 247 | sb->st_blksize = SSD_BLOCK_SIZE; |
| 248 | } |
| 249 | return ret; |
| 250 | } |
| 251 | |
| 252 | |
| 253 | int PS4API sceKernelStat(const char *path, SceKernelStat *sb) |
nothing calls this directly
no test coverage detected