ioctl() IOCTL_STAT use path instead of already open io handle

This commit is contained in:
2025-10-02 23:57:38 +02:00
parent c345e2284e
commit 2cfd3ee2fa
4 changed files with 21 additions and 8 deletions

View File

@ -68,7 +68,7 @@ void do_file(char *filepath) {
IoctlStat statbuf; ZERO(&statbuf);
ioctl(ioh, IOCTL_STAT, (uint64_t)&statbuf, 0, 0);
ioctl(ioh, IOCTL_STAT, (uint64_t)&statbuf, (uint64_t)filepath, 0);
if (statbuf.type != IOCTLSTAT_FILE) {
LOG(LOG_ERR, "%s is not a file (%d)\n", filepath, statbuf.type);
return;