summaryrefslogtreecommitdiff
path: root/hw/usb_client_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb_client_common.c')
-rwxr-xr-x[-rw-r--r--]hw/usb_client_common.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/usb_client_common.c b/hw/usb_client_common.c
index 50008ef..cf49131 100644..100755
--- a/hw/usb_client_common.c
+++ b/hw/usb_client_common.c
@@ -17,7 +17,6 @@
*/
#include <hw/usb_client.h>
-#include <hw/systemd.h>
#include <hw/shared.h>
#include <limits.h>
@@ -25,6 +24,8 @@
#include <string.h>
#include <unistd.h>
+#include <libgdbus/dbus-systemd.h>
+
#define zalloc(amount) calloc(1, amount)
#define MAX_GADGET_STR_LEN 256
@@ -560,7 +561,7 @@ static int legacy_enable(struct usb_client *usb)
fws = container_of(gadget->funcs[i],
struct usb_function_with_service, func);
- ret = systemd_start_service(fws->service);
+ ret = systemd_start_unit_sync(fws->service, ".service", -1);
if (ret < 0)
goto stop_services;
}
@@ -575,7 +576,7 @@ stop_services:
fws = container_of(gadget->funcs[i],
struct usb_function_with_service, func);
- systemd_stop_service(fws->service);
+ systemd_stop_unit_sync(fws->service, ".service", -1);
}
legacy_free_gadget(gadget);
@@ -600,7 +601,7 @@ static int legacy_disable(struct usb_client *usb)
continue;
fws = container_of(gadget->funcs[i], struct usb_function_with_service, func);
- ret = systemd_stop_service(fws->service);
+ ret = systemd_stop_unit_sync(fws->service, ".service", -1);
if (ret < 0)
goto free_gadget;
}