login: port tables over to use TABLE_UID/TABLE_PID

This commit is contained in:
Lennart Poettering 2019-08-07 14:50:01 +02:00
parent b26c0b68a4
commit 805f2df11f
2 changed files with 4 additions and 4 deletions

View File

@ -114,9 +114,9 @@ static int print_inhibitors(sd_bus *bus) {
r = table_add_many(table,
TABLE_STRING, who,
TABLE_UINT32, uid,
TABLE_UID, (uid_t) uid,
TABLE_STRING, strna(u),
TABLE_UINT32, pid,
TABLE_PID, (pid_t) pid,
TABLE_STRING, strna(comm),
TABLE_STRING, what,
TABLE_STRING, why,

View File

@ -184,7 +184,7 @@ static int list_sessions(int argc, char *argv[], void *userdata) {
r = table_add_many(table,
TABLE_STRING, id,
TABLE_UINT32, uid,
TABLE_UID, (uid_t) uid,
TABLE_STRING, user,
TABLE_STRING, seat,
TABLE_STRING, strna(tty));
@ -243,7 +243,7 @@ static int list_users(int argc, char *argv[], void *userdata) {
break;
r = table_add_many(table,
TABLE_UINT32, uid,
TABLE_UID, (uid_t) uid,
TABLE_STRING, user);
if (r < 0)
return log_error_errno(r, "Failed to add row to table: %m");