diff options
author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2022-11-26 00:58:14 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-01-08 18:22:10 +0100 |
commit | 8def4d63cd9c216d89b785f858c866257f9a6768 (patch) | |
tree | 4dcab67b1909e6283bcab7a5dceb15bb4d0e921a /linux/Platform.c | |
parent | 67bc7fe640bed8b8fa8006c9152442023928b756 (diff) |
Replace meaningless ID column with FD column in lock screen
Doubly meaningless since the IDs are now per-FD
Diffstat (limited to 'linux/Platform.c')
-rw-r--r-- | linux/Platform.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/Platform.c b/linux/Platform.c index d4972d41..4382c1ee 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -456,7 +456,7 @@ FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) { errno = 0; char *end = de->d_name; - strtoull(de->d_name, &end, 10); + int file = strtoull(de->d_name, &end, 10); if (errno || *end) continue; @@ -476,11 +476,11 @@ FileLocks_ProcessData* Platform_getProcessLocks(pid_t pid) { if (strncmp(buffer, "lock:\t", strlen("lock:\t"))) continue; - FileLocks_Data data = {0}; + FileLocks_Data data = {.fd = file}; int _; char lock_end[25], locktype[32], exclusive[32], readwrite[32]; if (10 != sscanf(buffer + strlen("lock:\t"), "%d: %31s %31s %31s %d %x:%x:%"PRIu64" %"PRIu64" %24s", - &data.id, locktype, exclusive, readwrite, &_, + &_, locktype, exclusive, readwrite, &_, &data.dev[0], &data.dev[1], &data.inode, &data.start, lock_end)) continue; |