chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nspawn: add --image= switch to boot GPT disk images that follow the Discoverable...
[elogind.git]
/
src
/
hostname
/
hostnamed.c
diff --git
a/src/hostname/hostnamed.c
b/src/hostname/hostnamed.c
index 36845c4972db9d69c1093276f84e68625d4ee998..6aa08cacb0385c5aca1af01638c55b30f69850c5 100644
(file)
--- a/
src/hostname/hostnamed.c
+++ b/
src/hostname/hostnamed.c
@@
-123,7
+123,7
@@
static const char* fallback_chassis(void) {
int r;
char *type;
unsigned t;
int r;
char *type;
unsigned t;
-
Virtualization
v;
+
int
v;
v = detect_virtualization(NULL);
v = detect_virtualization(NULL);
@@
-574,7
+574,7
@@
static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
return r;
}
return r;
}
- r = sd_bus_request_name(bus, "org.freedesktop.hostname1",
SD_BUS_NAME_REPLACE_EXISTING
);
+ r = sd_bus_request_name(bus, "org.freedesktop.hostname1",
0
);
if (r < 0) {
log_error("Failed to register name: %s", strerror(-r));
return r;
if (r < 0) {
log_error("Failed to register name: %s", strerror(-r));
return r;
@@
-635,18
+635,16
@@
int main(int argc, char *argv[]) {
r = context_read_data(&context);
if (r < 0) {
r = context_read_data(&context);
if (r < 0) {
- log_error("Failed to read
timezone data
: %s", strerror(-r));
+ log_error("Failed to read
hostname and machine information
: %s", strerror(-r));
goto finish;
}
goto finish;
}
- r = bus_event_loop_with_idle(event, bus, "org.freedesktop.hostname1", DEFAULT_EXIT_USEC);
+ r = bus_event_loop_with_idle(event, bus, "org.freedesktop.hostname1", DEFAULT_EXIT_USEC
, NULL, NULL
);
if (r < 0) {
log_error("Failed to run event loop: %s", strerror(-r));
goto finish;
}
if (r < 0) {
log_error("Failed to run event loop: %s", strerror(-r));
goto finish;
}
- r = 0;
-
finish:
context_free(&context, bus);
finish:
context_free(&context, bus);