busctl: let's make use of the log_error_errno() calls
This commit is contained in:
+4
-8
@@ -887,10 +887,8 @@ static int introspect(sd_bus *bus, char **argv) {
|
||||
return log_oom();
|
||||
|
||||
r = sd_bus_call_method(bus, argv[1], argv[2], "org.freedesktop.DBus.Introspectable", "Introspect", &error, &reply_xml, "");
|
||||
if (r < 0) {
|
||||
log_error("Failed to introspect object %s of service %s: %s", argv[2], argv[1], bus_error_message(&error, r));
|
||||
return r;
|
||||
}
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to introspect object %s of service %s: %s", argv[2], argv[1], bus_error_message(&error, r));
|
||||
|
||||
r = sd_bus_message_read(reply_xml, "s", &xml);
|
||||
if (r < 0)
|
||||
@@ -915,10 +913,8 @@ static int introspect(sd_bus *bus, char **argv) {
|
||||
continue;
|
||||
|
||||
r = sd_bus_call_method(bus, argv[1], argv[2], "org.freedesktop.DBus.Properties", "GetAll", &error, &reply, "s", m->interface);
|
||||
if (r < 0) {
|
||||
log_error("%s", bus_error_message(&error, r));
|
||||
return r;
|
||||
}
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "%s", bus_error_message(&error, r));
|
||||
|
||||
r = sd_bus_message_enter_container(reply, 'a', "{sv}");
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user