Skip to content

Commit b8b2fab

Browse files
committed
Haiku: fix building
1 parent 7aceb10 commit b8b2fab

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/common/processing_linux.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,12 +327,12 @@ void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, cons
327327
{
328328
// args = "/bin/bash -l"
329329
// argc = 2
330-
int argc = info.argc - 1; // 1
331-
const char* arg0End = strchr(p, ' '); // " -l"
330+
int argc = info.argc - 1;
331+
const char* arg0End = strchr(info.args, ' ');
332332
for (const char* p = arg0End + 1; (p = strchr(p, ' ')); ++p)
333333
--argc;
334-
if (argc == 1)
335-
ffStrbufSetNS(exe, info.args, arg0End - info.args /* /bin/bash */);
334+
if (argc == 1) // No whitespace in the file path
335+
ffStrbufSetNS(exe, (uint32_t) (arg0End - info.args), info.args);
336336
}
337337
}
338338
}

src/detection/physicaldisk/physicaldisk_haiku.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static const char* detectDisk(FFstrbuf* path, const char* diskType, FFlist* resu
3434
device->type = FF_PHYSICALDISK_TYPE_NONE;
3535
device->type |= (geometry.read_only ? FF_PHYSICALDISK_TYPE_READONLY : FF_PHYSICALDISK_TYPE_READWRITE) |
3636
(geometry.removable ? FF_PHYSICALDISK_TYPE_REMOVABLE : FF_PHYSICALDISK_TYPE_FIXED);
37-
device->size = (uint64_t) geometry.cylinder_count *geometry.heads * geometry.sectors_per_track * geometry.bytes_per_sector;
37+
device->size = (uint64_t) geometry.cylinder_count * geometry.head_count * geometry.sectors_per_track * geometry.bytes_per_sector;
3838

3939
return NULL;
4040
}

0 commit comments

Comments
 (0)