Skip to content

Commit

Permalink
Haiku: fix building
Browse files Browse the repository at this point in the history
  • Loading branch information
CarterLi committed Feb 18, 2025
1 parent 7aceb10 commit b8b2fab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/common/processing_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,12 @@ void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, cons
{
// args = "/bin/bash -l"
// argc = 2
int argc = info.argc - 1; // 1
const char* arg0End = strchr(p, ' '); // " -l"
int argc = info.argc - 1;
const char* arg0End = strchr(info.args, ' ');
for (const char* p = arg0End + 1; (p = strchr(p, ' ')); ++p)
--argc;
if (argc == 1)
ffStrbufSetNS(exe, info.args, arg0End - info.args /* /bin/bash */);
if (argc == 1) // No whitespace in the file path
ffStrbufSetNS(exe, (uint32_t) (arg0End - info.args), info.args);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/detection/physicaldisk/physicaldisk_haiku.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static const char* detectDisk(FFstrbuf* path, const char* diskType, FFlist* resu
device->type = FF_PHYSICALDISK_TYPE_NONE;
device->type |= (geometry.read_only ? FF_PHYSICALDISK_TYPE_READONLY : FF_PHYSICALDISK_TYPE_READWRITE) |
(geometry.removable ? FF_PHYSICALDISK_TYPE_REMOVABLE : FF_PHYSICALDISK_TYPE_FIXED);
device->size = (uint64_t) geometry.cylinder_count *geometry.heads * geometry.sectors_per_track * geometry.bytes_per_sector;
device->size = (uint64_t) geometry.cylinder_count * geometry.head_count * geometry.sectors_per_track * geometry.bytes_per_sector;

return NULL;
}
Expand Down

0 comments on commit b8b2fab

Please sign in to comment.