From 8def4d63cd9c216d89b785f858c866257f9a6768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sat, 26 Nov 2022 00:58:14 +0100 Subject: Replace meaningless ID column with FD column in lock screen Doubly meaningless since the IDs are now per-FD --- linux/Platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'linux/Platform.c') 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; -- cgit v1.2.3