diff options
author | Daniel Lange <DLange@git.local> | 2024-01-10 11:17:08 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2024-01-10 11:17:08 +0100 |
commit | e7372d18a1a661d8c3dba9f51e1f17b5f94171a7 (patch) | |
tree | e8270dd60ec096bee8157dbadf029e15ed584592 /ProcessLocksScreen.c | |
parent | 937052b231259a47d881d539ad5748245ef55b99 (diff) | |
download | debian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.tar.gz debian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.tar.bz2 debian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.zip |
New upstream version 3.3.0
Diffstat (limited to 'ProcessLocksScreen.c')
-rw-r--r-- | ProcessLocksScreen.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ProcessLocksScreen.c b/ProcessLocksScreen.c index b842d2b..36a37f9 100644 --- a/ProcessLocksScreen.c +++ b/ProcessLocksScreen.c @@ -24,10 +24,11 @@ ProcessLocksScreen* ProcessLocksScreen_new(const Process* process) { ProcessLocksScreen* this = xMalloc(sizeof(ProcessLocksScreen)); Object_setClass(this, Class(ProcessLocksScreen)); if (Process_isThread(process)) - this->pid = process->tgid; + this->pid = Process_getThreadGroup(process); else - this->pid = process->pid; - return (ProcessLocksScreen*) InfoScreen_init(&this->super, process, NULL, LINES - 2, " ID TYPE EXCLUSION READ/WRITE DEVICE:INODE START END FILENAME"); + this->pid = Process_getPid(process); + + return (ProcessLocksScreen*) InfoScreen_init(&this->super, process, NULL, LINES - 2, " FD TYPE EXCLUSION READ/WRITE DEVICE NODE START END FILENAME"); } void ProcessLocksScreen_delete(Object* this) { @@ -64,18 +65,18 @@ static void ProcessLocksScreen_scan(InfoScreen* this) { char entry[512]; if (ULLONG_MAX == data->end) { - xSnprintf(entry, sizeof(entry), "%10d %-10s %-10s %-10s %02x:%02x:%020"PRIu64" %20"PRIu64" %20s %s", - data->id, + xSnprintf(entry, sizeof(entry), "%5d %-10s %-10s %-10s %#6"PRIx64" %10"PRIu64" %19"PRIu64" %19s %s", + data->fd, data->locktype, data->exclusive, data->readwrite, - data->dev[0], data->dev[1], data->inode, + (uint64_t) data->dev, data->inode, data->start, "<END OF FILE>", data->filename ? data->filename : "<N/A>" ); } else { - xSnprintf(entry, sizeof(entry), "%10d %-10s %-10s %-10s %02x:%02x:%020"PRIu64" %20"PRIu64" %20"PRIu64" %s", - data->id, + xSnprintf(entry, sizeof(entry), "%5d %-10s %-10s %-10s %#6"PRIx64" %10"PRIu64" %19"PRIu64" %19"PRIu64" %s", + data->fd, data->locktype, data->exclusive, data->readwrite, - data->dev[0], data->dev[1], data->inode, + (uint64_t) data->dev, data->inode, data->start, data->end, data->filename ? data->filename : "<N/A>" ); |