chiark / gitweb /
bus: fix return message if StartServiceByName() in the driver fails due
authorLennart Poettering <lennart@poettering.net>
Tue, 24 Dec 2013 17:42:38 +0000 (18:42 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 24 Dec 2013 17:42:38 +0000 (18:42 +0100)
to non-existing service

src/bus-driverd/bus-driverd.c

index 8888a07..57023ec 100644 (file)
@@ -695,7 +695,7 @@ static int driver_start_service_by_name(sd_bus *bus, sd_bus_message *m, void *us
                 return r;
 
         if (!t || !t[0] || t[1])
                 return r;
 
         if (!t || !t[0] || t[1])
-                return -EIO;
+                return sd_bus_error_setf(error, SD_BUS_ERROR_SERVICE_UNKNOWN, "Bus name %s not found.", name);
 
         r = sd_bus_call_method(
                         bus,
 
         r = sd_bus_call_method(
                         bus,