assert(r >= 0);
while ((r = sd_bus_message_read(reply, "(ssssuu)", &what, &who, &why, &mode, &uid, &pid)) > 0) {
- printf("what=<%s> who=<%s> why=<%s> mode=<%s> uid=<%lu> pid=<%lu>\n",
- what, who, why, mode, (unsigned long) uid, (unsigned long) pid);
+ printf("what=<%s> who=<%s> why=<%s> mode=<%s> uid=<"UID_FMT"> pid=<"PID_FMT">\n",
+ what, who, why, mode, uid, pid);
n++;
}
assert(fd2 >= 0);
print_inhibitors(bus);
- close_nointr_nofail(fd1);
+ safe_close(fd1);
sleep(1);
print_inhibitors(bus);
- close_nointr_nofail(fd2);
+ safe_close(fd2);
sleep(1);
print_inhibitors(bus);