chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prep v232.2: libelogind.sym: Rename LIBELOGIND back to LIBSYSTEMD.
[elogind.git]
/
src
/
login
/
test-inhibit.c
diff --git
a/src/login/test-inhibit.c
b/src/login/test-inhibit.c
index 5379ffcaa1a055d735dad6e6ebb0450f3de59b13..a3cf9d293b4d5c1b39040d5f50a7da6e66a1b6a6 100644
(file)
--- a/
src/login/test-inhibit.c
+++ b/
src/login/test-inhibit.c
@@
-1,5
+1,3
@@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
/***
This file is part of systemd.
/***
This file is part of systemd.
@@
-21,15
+19,16
@@
#include <unistd.h>
#include <unistd.h>
-#include "macro.h"
-#include "util.h"
#include "sd-bus.h"
#include "sd-bus.h"
+
#include "bus-util.h"
#include "bus-util.h"
-#include "bus-error.h"
+#include "fd-util.h"
+#include "macro.h"
+#include "util.h"
static int inhibit(sd_bus *bus, const char *what) {
static int inhibit(sd_bus *bus, const char *what) {
- _cleanup_
bus_message_unref_
sd_bus_message *reply = NULL;
- _cleanup_
bus_error_free_
sd_bus_error error = SD_BUS_ERROR_NULL;
+ _cleanup_
(sd_bus_message_unrefp)
sd_bus_message *reply = NULL;
+ _cleanup_
(sd_bus_error_free)
sd_bus_error error = SD_BUS_ERROR_NULL;
const char *who = "Test Tool", *reason = "Just because!", *mode = "block";
int fd;
int r;
const char *who = "Test Tool", *reason = "Just because!", *mode = "block";
int fd;
int r;
@@
-52,8
+51,8
@@
static int inhibit(sd_bus *bus, const char *what) {
}
static void print_inhibitors(sd_bus *bus) {
}
static void print_inhibitors(sd_bus *bus) {
- _cleanup_
bus_message_unref_
sd_bus_message *reply = NULL;
- _cleanup_
bus_error_free_
sd_bus_error error = SD_BUS_ERROR_NULL;
+ _cleanup_
(sd_bus_message_unrefp)
sd_bus_message *reply = NULL;
+ _cleanup_
(sd_bus_error_free)
sd_bus_error error = SD_BUS_ERROR_NULL;
const char *what, *who, *why, *mode;
uint32_t uid, pid;
unsigned n = 0;
const char *what, *who, *why, *mode;
uint32_t uid, pid;
unsigned n = 0;
@@
-73,7
+72,7
@@
static void print_inhibitors(sd_bus *bus) {
assert_se(r >= 0);
while ((r = sd_bus_message_read(reply, "(ssssuu)", &what, &who, &why, &mode, &uid, &pid)) > 0) {
assert_se(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=<
"UID_FMT"> pid=<"PID_FMT
">\n",
+ printf("what=<%s> who=<%s> why=<%s> mode=<%s> uid=<
%"PRIu32"> pid=<%"PRIu32
">\n",
what, who, why, mode, uid, pid);
n++;
what, who, why, mode, uid, pid);
n++;
@@
-84,7
+83,7
@@
static void print_inhibitors(sd_bus *bus) {
}
int main(int argc, char*argv[]) {
}
int main(int argc, char*argv[]) {
- _cleanup_
bus_unref_
sd_bus *bus = NULL;
+ _cleanup_
(sd_bus_unrefp)
sd_bus *bus = NULL;
int fd1, fd2;
int r;
int fd1, fd2;
int r;