From: sanghyeok.oh Date: Tue, 29 Jan 2019 07:53:20 +0000 (+0900) Subject: dbus: remove systemd start/stop unit api X-Git-Tag: submit/tizen/20190208.064159~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e5459d1c8b96daffc26bde742be03fa19a20d02;p=platform%2Fcore%2Fsystem%2Flibdevice-node.git dbus: remove systemd start/stop unit api Change-Id: Ic498a2c56ffaccdcacf2c01d5d20a169fc5324cf Signed-off-by: sanghyeok.oh --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fcf2780..eaabdc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/${INC_DIR}) INCLUDE(FindPkgConfig) -pkg_check_modules(rpkgs REQUIRED dlog vconf glib-2.0 libsystemd libusbgx) +pkg_check_modules(rpkgs REQUIRED dlog vconf glib-2.0 libsystemd libusbgx libgdbus) FOREACH(flag ${rpkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") @@ -40,7 +40,7 @@ TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${rpkgs_LDFLAGS} "-ldl") SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION}) INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries) -ADD_LIBRARY(hwcommon SHARED hw/common.c hw/systemd.c hw/usb_client_common.c hw/usb_cfs_client_common.c hw/usb_gadget_common.c) +ADD_LIBRARY(hwcommon SHARED hw/common.c hw/usb_client_common.c hw/usb_cfs_client_common.c hw/usb_gadget_common.c) TARGET_LINK_LIBRARIES(hwcommon ${rpkgs_LDFLAGS} "-ldl") SET_TARGET_PROPERTIES(hwcommon PROPERTIES SOVERSION ${VERSION}) INSTALL(TARGETS hwcommon DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries) diff --git a/hw/usb_cfs_client_common.c b/hw/usb_cfs_client_common.c old mode 100644 new mode 100755 index 1982283..3a4246b --- a/hw/usb_cfs_client_common.c +++ b/hw/usb_cfs_client_common.c @@ -17,7 +17,6 @@ */ #include -#include #include #include @@ -29,7 +28,8 @@ #include #include -#include +#include + #define zalloc(amount) calloc(1, amount) @@ -650,7 +650,7 @@ static int cfs_prep_ffs_service(const char *name, const char *instance, if (ret < 0) return ret; - ret = systemd_start_socket(socket_name); + ret = systemd_start_unit_sync(socket_name, ".socket", -1); if (ret < 0) goto umount_ffs; @@ -925,8 +925,8 @@ int hw_cfs_gadget_close(struct hw_common *common) fws = container_of(usb_func, struct usb_function_with_service, func); - systemd_stop_socket(fws->service); - systemd_stop_service(fws->service); + systemd_stop_unit_sync(fws->service, ".socket", -1); + systemd_stop_unit_sync(fws->service, ".service", -1); } } diff --git a/hw/usb_client_common.c b/hw/usb_client_common.c old mode 100644 new mode 100755 index 50008ef..cf49131 --- a/hw/usb_client_common.c +++ b/hw/usb_client_common.c @@ -17,7 +17,6 @@ */ #include -#include #include #include @@ -25,6 +24,8 @@ #include #include +#include + #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; } diff --git a/packaging/libdevice-node.spec b/packaging/libdevice-node.spec index b2f46df..cef9b95 100644 --- a/packaging/libdevice-node.spec +++ b/packaging/libdevice-node.spec @@ -11,24 +11,25 @@ BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gio-2.0) -BuildRequires: pkgconfig(gmock) -BuildRequires: pkgconfig(capi-system-info) -BuildRequires: pkgconfig(libsystemd) -BuildRequires: pkgconfig(libusbgx) +BuildRequires: pkgconfig(gmock) +BuildRequires: pkgconfig(capi-system-info) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(libusbgx) +BuildRequires: pkgconfig(libgdbus) %description development package of library to control OAL APIs %package devel -Summary: Control OAL APIs (devel) -Requires: %{name} = %{version}-%{release} +Summary: Control OAL APIs (devel) +Requires: %{name} = %{version}-%{release} %description devel Library to control OAL APIs (devel) %package -n device-haltests -Summary: Device HAL(Hardware Abstraction Layer) Test Cases -Requires: %{name} = %{version}-%{release} +Summary: Device HAL(Hardware Abstraction Layer) Test Cases +Requires: %{name} = %{version}-%{release} %description -n device-haltests Device HAL(Hardware Abstraction Layer) Test Cases