mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
libs: use correct format for long long integer in ProcessesLocal::Private::readProcStatus()
fixes uid and gid scanning on systems using musl libc Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
b9ed28a41c
commit
494c5fac69
1 changed files with 2 additions and 2 deletions
|
@ -98,14 +98,14 @@ bool ProcessesLocal::Private::readProcStatus(const QString &dir, Process *proces
|
|||
}
|
||||
case 'U': {
|
||||
if((unsigned int)size > sizeof("Uid:") && qstrncmp(mBuffer, "Uid:", sizeof("Uid:")-1) == 0) {
|
||||
sscanf(mBuffer + sizeof("Uid:") -1, "%Ld %Ld %Ld %Ld", &process->uid, &process->euid, &process->suid, &process->fsuid);
|
||||
sscanf(mBuffer + sizeof("Uid:") -1, "%lld %lld %lld %lld", &process->uid, &process->euid, &process->suid, &process->fsuid);
|
||||
if(++found == 5) goto finish;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'G': {
|
||||
if((unsigned int)size > sizeof("Gid:") && qstrncmp(mBuffer, "Gid:", sizeof("Gid:")-1) == 0) {
|
||||
sscanf(mBuffer + sizeof("Gid:")-1, "%Ld %Ld %Ld %Ld", &process->gid, &process->egid, &process->sgid, &process->fsgid);
|
||||
sscanf(mBuffer + sizeof("Gid:")-1, "%lld %lld %lld %lld", &process->gid, &process->egid, &process->sgid, &process->fsgid);
|
||||
if(++found == 5) goto finish;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue