chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udev: really exclude device-mapper from block device ownership event locking
[elogind.git]
/
src
/
login
/
inhibit.c
diff --git
a/src/login/inhibit.c
b/src/login/inhibit.c
index 48c2ec401ffdfbdfebb6533ea3d2b7545030b20e..24e8fb04bd5544d733ff3b92ebcf581e7aa62f48 100644
(file)
--- a/
src/login/inhibit.c
+++ b/
src/login/inhibit.c
@@
-64,7
+64,7
@@
static int inhibit(sd_bus *bus, sd_bus_error *error) {
if (r < 0)
return r;
if (r < 0)
return r;
- r =
dup(fd
);
+ r =
fcntl(fd, F_DUPFD_CLOEXEC, 3
);
if (r < 0)
return -errno;
if (r < 0)
return -errno;
@@
-100,11
+100,11
@@
static int print_inhibitors(sd_bus *bus, sd_bus_error *error) {
get_process_comm(pid, &comm);
u = uid_to_name(uid);
get_process_comm(pid, &comm);
u = uid_to_name(uid);
- printf(" Who: %s (UID
%lu/%s, PID %lu
/%s)\n"
+ printf(" Who: %s (UID
"UID_FMT"/%s, PID "PID_FMT"
/%s)\n"
" What: %s\n"
" Why: %s\n"
" Mode: %s\n\n",
" What: %s\n"
" Why: %s\n"
" Mode: %s\n\n",
- who,
(unsigned long) uid, strna(u), (unsigned long)
pid, strna(comm),
+ who,
uid, strna(u),
pid, strna(comm),
what,
why,
mode);
what,
why,
mode);