Mateusz Moscicki [Tue, 20 Jun 2023 11:15:22 +0000 (13:15 +0200)]
Allow to change the default connection type to private
This is used to ensure that applications launched by launchpad get their
own connection with the appropriate label, rather than using the
connection that was established before the label change.
Change-Id: Id1a6c80638c762f3de8856410b562df653dd70b5
wchang kim [Thu, 4 May 2023 08:35:13 +0000 (17:35 +0900)]
Remove the unnecessary dependencies and fix pc file
If it have to make the dependency with specific packages
at install time of rpm package , 'Requires' keyword should be used.
But, development packages are only used when building the packages
and they are not needed to be included in the image like rootfs.img.
In result, remove the unnecessary dependencies and fix pc file
from platform image.
Change-Id: Ic14f2ab2bbe5134bedd948618c1aeee1e6d2d0fb
Signed-off-by: wchang kim <wchang.kim@samsung.com>
[cw00.choi: Update patch title and add description]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
SangYoun Kwak [Thu, 8 Jun 2023 02:10:22 +0000 (11:10 +0900)]
plugin-api: Fix the name of backend .so files
The name for plugin backend .so files changed:
libplugin-resourced-memory-lmk.so
-> libplugin-backend-resourced-memory-lmk.so
Since there are other packages start with "system-plugin", it is
necessary to show that it is a backend for system-plugin.
Change-Id: I5b11cfc6c1cdf39a3b60758d8bc2c075ac348ce9
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Fri, 28 Apr 2023 04:55:10 +0000 (13:55 +0900)]
plugin-api: Add manifest to plugin-api packages
Previously, the smack label("_") was added by 'chsmack' command.
By adding '%manifest' in the '%file' section, smack label can be applied
to files without using chsmack in the '%post' section.
Change-Id: Icd91b04e46d0eeb4182454aada7705ff0952c8fb
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Thu, 27 Apr 2023 05:13:39 +0000 (14:13 +0900)]
plugin-api: Rename 'plugin' to 'syscommon-plugin'
Since the plugin-api is the plugin feature which is only used in system
scope and it is located in libsyscommon, plugin was changed to
syscommon-plugin to indicate its usage and location.
Change rule:
* Basically, plugin becomes syscommon-plugin to indicate it is from
the libsyscommon repository
* Symbols which are used internally can omit the prefix 'syscommon'.
Changed:
* Package name: plugin-api... -> libsyscommon-plugin-api...
* Package config file name:
plugin-api-....pc -> libsyscommon-plugin-api....pc
* .so name: libplugin-api-....so -> libsyscommon-plugin-api....so
Change-Id: Ia56c935ebf97a93cad7efd0235508c540ee0348d
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Thu, 16 Mar 2023 11:45:18 +0000 (20:45 +0900)]
plugin-api: Fix the prefix for pkg_check_modules of CMakeLists.txt
The command pkg_check_modules in CMakeLists.txt checks modules and sets
variables about these modules.
The names of these variables have their prefix designated by the command
pkg_check_modules like below:
pkg_check_modules(<prefix> REQUIRED <modules>)
Previously, in plugin-api-common, prefix was "pkgs", which is not a
unique name.
In plugin-api-resourced, prefix was ${PROJECT_NAME} but when calling
variables, "pkgs" was used for prefix, which is not correct usage.
This fault was fixed by replacing their prefix as their ${PROJECT_NAME}.
Change-Id: Ide1db4b707f2c6e9f632c0cc36ab4ec654383887
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
Youngjae Cho [Fri, 17 Mar 2023 00:57:59 +0000 (09:57 +0900)]
plugin-api: deviced: Add plugin-api-deviced
Initialize plugin-api for deviced. It creates package plugin-api-deviced
and the package contains empty library.
Change-Id: I2a91b9185e4b9f0ffbe61c4d71801d20a15b0df2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Fri, 17 Mar 2023 00:40:27 +0000 (09:40 +0900)]
packaging: Rearrange %package directive
As those relocated %packages overwrite the %{version} of libsyscommon,
define %{libsyscommon_version} to maintain its value.
Change-Id: I0049a45fdd343515e09c97a4abf0f8aa6ea9704a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 16 Mar 2023 04:07:42 +0000 (13:07 +0900)]
resource-manager: cleanup resource instance correctly
On failure during create_resource(), remove resource instance from
hashtable if it has been registered hashtable via add_resource().
Change-Id: I124add4633b06be0e3a2bc2786f1eee8b69acce0
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 16 Mar 2023 03:54:51 +0000 (12:54 +0900)]
Revert "resource-manager: Relocate add_resource() in create_resource()"
This reverts commit
5880b22f3e55b60c7b9326c51012b95f05416145.
The resource instance must be added to hashtable prior to the operation
driver->ops.create(resource->id). As this operation passes resource id,
it is possible that the operation work based on that resource id, which
denotes resource instance and must have been registered to hashtable.
Therefore, add_resource() must be followed by driver->ops.create().
Change-Id: I05b8a9f85741313c14201501fe6bbc4a5b8c7233
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
TaeminYeom [Thu, 23 Feb 2023 07:51:13 +0000 (16:51 +0900)]
ini-parser: Fix size_t to ssize_t
Variable "n_read" brings the return of getline,
but return type of getline is ssize_t.
Also, fseek's second parameter is long type,
so it is proper to use signed data type.
Change-Id: I87f01a986a9b7fa68d7a675a1e31a0afe0c1f4bf
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
SangYoun Kwak [Wed, 8 Feb 2023 10:59:30 +0000 (19:59 +0900)]
plugin-api: resourced: Add plugin-api-resourced
This plugin api provides functions for resourced.
Provided functions:
* plugin_resourced_low_memory_killer_get_backend: get backend library
* plugin_resourced_low_memory_killer_put_backend: put backend library
* plugin_resourced_low_memory_killer_get_kill_candidates: choose kill
candidates from procs/apps list.
The files newly created during build due to this patch are as follows:
(arch=armv7l)
plugin-api-resourced-0.1.0-0.armv7l.rpm
* /usr/lib: libplugin-api-resourced.so.0 -> libplugin-api-resourced.so.0.1.0
* /usr/lib: libplugin-api-resourced.so.0.1.0
* /usr/share/licenses/plugin-api/resourced: LICENSE.MIT
plugin-api-resourced-debuginfo-0.1.0-0.armv7l.rpm
* /usr/lib/debug/usr/lib/libplugin-api-resourced.so.0.1.0.debug
libsyscommon-debugsource-5.0.0-0.armv7l.rpm
* /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/resourced/include: plugin-resourced-memory-lmk-interface.h
* /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/resourced/src: plugin-resourced-memory-lmk.c
plugin-api-resourced-devel-0.1.0-0.armv7l.rpm
* /usr/include/plugin: plugin-resourced-memory-lmk.h
* /usr/include/plugin: plugin-resourced-memory-lmk-interface.h
* /usr/lib: libplugin-api-resourced.so -> libplugin-api-resourced.so.0
* /usr/lib/pkgconfig: plugin-api-resourced.pc
* /usr/share/licenses/plugin-api/resourced: LICENSE.MIT
Change-Id: I3f9c2deac1220131df5bb8a3db502b40dc1bdd72
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Tue, 7 Feb 2023 06:53:24 +0000 (15:53 +0900)]
plugin-api: common: Add plugin-api-common
plugin-api was added to provide plugin feature.
Plugin separates target-specific code to plugin-backend
from common Tizen codes such as deviced or resourced.
The structure of plugin-api is based on the hal-api.
The files newly created during build due to this patch are as follows:
(arch=armv7l)
plugin-api-common-0.1.0-0.armv7l.rpm
* /usr/lib/: libplugin-api-common.so.0 -> libplugin-api-common.so.0.1.0
* /usr/lib/: libplugin-api-common.so.0.1.0
* /usr/share/licenses/plugin-api-common: LICENSE.MIT
plugin-api-common-debuginfo-0.1.0-0.armv7l
* /usr/lib/debug/usr/lib: libplugin-api-common.so.0.1.0.debug
libsyscommon-debugsource-5.0.0-0.armv7l.rpm
* /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/include: plugin-common.h
* /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/include: plugin-common-interface.h
* /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/src: plugin-api-list.h
* /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/src: plugin-api-conf.c
* /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/src: plugin-api-conf.h
* /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/src: common.h
* /usr/src/debug/libsyscommon-5.0.0-0.arm/src/plugin-api/common/src: plugin-api-common.c
plugin-api-common-devel-0.1.0-0.armv7l
* /usr/include/plugin: plugin-common.h
* /usr/include/plugin: plugin-common-interface.h
* /usr/lib/: libplugin-api-common.so -> libplugin-api-common.so.0
* /usr/lib/pkgconfig/plugin-api-common.pc
* /usr/share/licenses/plugin-api-common: LICENSE.MIT
Change-Id: I3c0b385d7bd76b82db8db73beb189b78009b8774
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
Youngjae Cho [Thu, 9 Mar 2023 00:23:06 +0000 (09:23 +0900)]
resource-manager: Relocate add_resource() in create_resource()
If operations following the add_resource() fail, then it is necessary
to cleanup resource instance from hashtable that has been added by
add_resource(). Instead of impelementing cleanup, move add_resource()
to the end of create_resource() so that nothing follow add_resource().
Change-Id: I705a3dc3487c8ebf9e80cff51b7e89069a6a4f1a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 16 Feb 2023 04:44:03 +0000 (13:44 +0900)]
resource-manager: Introduce attribute setter
The setter is only allowed for resource type of INSTANCE_TYPE_NORMAL.
- syscommon_resman_set_resource_attr_int()
- syscommon_resman_set_resource_attr_int64()
- syscommon_resman_set_resource_attr_uint()
- syscommon_resman_set_resource_attr_uint64()
- syscommon_resman_set_resource_attr_double()
- syscommon_resman_set_resource_attr_string()
- syscommon_resman_set_resource_attr_array()
- syscommon_resman_set_resource_attr_ptr()
Change-Id: I0e30425c35ec6df9660ef3c57a5ecd6a5769e1dd
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Wed, 15 Feb 2023 08:37:17 +0000 (17:37 +0900)]
resource-manager: Add get API for INSTANCE_TYPE_NORMAL
Resource instance type of INSTANCE_TYPE_NORMAL fetches its attribute
value by calling attribute_ops.get().
- syscommon_resman_get_resource_attr_int()
- syscommon_resman_get_resource_attr_int64()
- syscommon_resman_get_resource_attr_uint()
- syscommon_resman_get_resource_attr_uint64()
- syscommon_resman_get_resource_attr_double()
- syscommon_resman_get_resource_attr_string()
- syscommon_resman_get_resource_attr_array()
- syscommon_resman_get_resource_attr_ptr()
Change-Id: Ib3482ff685b0c3e4783cd8a3ce7dc5e6ab1e9699
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 21 Feb 2023 08:06:22 +0000 (17:06 +0900)]
resource-manager: Make monitor API be exclusive for INSTANCE_TYPE_MONITOR
The APIs for monitor instance has changed to return error when it is
used on instance type other than INSTANCE_TYPE_MONITOR.
Change-Id: Ifa1ce8924e60cb3a08ab467bf6f112421bd0abb7
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 21 Feb 2023 03:10:00 +0000 (12:10 +0900)]
resource-manager: Reimplement attribute_ops
attribute_ops is in charge of operations for resource instance type
of INSTANCE_TYPE_NORMAL. As the is_resource_attr_supported() works
based on instance type, API for NORMAL instance has been added.
- syscommon_resman_is_resource_attr_supported()
Change-Id: Ia9078f9d4639f6ce3812a4749aaf0ada87af22f2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 21 Feb 2023 01:41:58 +0000 (10:41 +0900)]
resource-manager: Introduce resource instance type
To clearly partition the way how resource works, added instance_type
to resource, INSTANCE_TYPE_NORMAL and INSTANCE_TYPE_MONITOR. Resource
instance of each type can be created by the below functions:
- INSTANCE_TYPE_NORMAL: syscommon_resman_create_resource()
- INSTANCE_TYPE_MONITOR: syscommon_resman_monitor_create_resource()
Instance type of NORMAL sets all interest bits by default. Therefore,
it doesn't need to set interest bit additionally. On the other hand,
instance type of MONITOR clears all interest bits by default. Therefore,
it should set bit manually in which a monitor interest before it starts
monitoring.
In addition, instance type of NORMAL always invoke its attribute
getter for every access to attribute value. That is, it always fetches
the latest value. On the other hand, instance type of MONITOR fetches
attribute value on a specific time that must have been synchronized by
syscommon_resman_monitor_update_resource_attrs().
Change-Id: I39b2089a21d5b5d7b59704a7835e2646939a20c2
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 21 Feb 2023 01:25:29 +0000 (10:25 +0900)]
resource-manager: Change variable name
There will be another type, instance_type, which denotes how an resource
instance operates. To clearly distinguish role of those variables, change
variable name type to resource_type.
Change-Id: I2b5dd012d86cc7869da7206feea4ffad7f1dd8c3
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
TaeminYeom [Thu, 23 Feb 2023 04:48:29 +0000 (13:48 +0900)]
resource-manager: Fix license Apache to MIT
libsyscommon project is under the MIT license,
but newly added files were marked with Apache licenses.
[Changed file]
src/resource-manager/resource-device.c
src/resource-manager/resource-device.h
src/resource-manager/resource-listener-epoll.c
src/resource-manager/resource-listener.h
src/resource-manager/resource-manager.c
src/resource-manager/resource-manager.h
src/resource-manager/resource-type.h
Change-Id: I922df053003b2d1924543fd26690f7dd58069c42
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
Dongwoo Lee [Fri, 17 Feb 2023 05:43:08 +0000 (14:43 +0900)]
resource-manager: Rename existing ops to monitor_ops
Change-Id: I2d5e1228052a24c52831a1ac64b6e8c9a6394617
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Dongwoo Lee [Fri, 17 Feb 2023 02:59:48 +0000 (11:59 +0900)]
Revert "resource-manager: introduce sync getter"
Since non-sync getter for monitoring is moved into monitor_ops, sync
suffix for normal getter/setter is no more needed. Thus, this reverts
commit
ad9493c0b5ae ("resource-manager: introduce sync getter").
Change-Id: I667899fc5254fa3777ffa5d784f062a3fa9e28c5
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Youngjae Cho [Wed, 15 Feb 2023 02:03:12 +0000 (11:03 +0900)]
resource-manager: reduce repetitive code
Change-Id: I374f930323e3f85550251d015e4f9c320b554d1f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Dongwoo Lee [Thu, 12 Jan 2023 01:01:22 +0000 (10:01 +0900)]
resource-manager: Add epoll type listener support
To support ease of use for epoll type listener, this introduces
following APIs:
- syscommon_resman_register_epoll_listener: register fd to epoll
listener worker thread and returns listener handle id.
- syscommon_resman_unregister_epoll_listener: unregister fd from
worker for the correspongding handle id. (fd is not closed by this
function, so caller resource driver should be close fd by its own
responsibility.
Change-Id: Ide38a3816742939c9101e5a92944f8dc2480ff8f
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Dongwoo Lee [Thu, 12 Jan 2023 01:01:22 +0000 (10:01 +0900)]
resource-manager: Introduce attribute listener operations
Now each attribute can have 'listener_ops' which consists 'init',
'exit', and 'action', to watch changes for underlying state. Each
operation has a role as below:
- init: allocate resources and register listeners
- exit: deallocate resources and unregister listeners
- action: change attribute values as following listener parameters
'init'/'exit' is called automatically when each attribute interest is
set/unset each, on the other hand, 'action' should be called by each
listener.
Change-Id: I076f41f751b18f4c39d7548e4d78ddc02e8e26a2
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Youngjae Cho [Thu, 9 Feb 2023 04:39:57 +0000 (13:39 +0900)]
resource-manager: revamp init/exit of resource driver
Change-Id: I24bf3bd1b93bbe53c170522bc039b082191989de
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunhee Seo [Mon, 6 Feb 2023 05:42:42 +0000 (14:42 +0900)]
libgdbus: add dbus signal for power lock state change
In this context, power lock state is meaning of "locked or unlocked".
Thus, If the power lock state of specific pmlock is changed,
this signal will be used.
Change-Id: I9db5527bf9668fe54ee9c0c19a2be23b42f91517
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Youngjae Cho [Mon, 6 Feb 2023 10:05:08 +0000 (19:05 +0900)]
resource-manager: allocate resource id correctly
It hasn't cleared sign bit on allocating resource id. Fix it to clear
sign bit correctly.
Change-Id: Ic429dd26bcd6082ed434aecf98b8a48eb0b52b47
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Chanwoo Choi [Thu, 12 Jan 2023 13:48:30 +0000 (22:48 +0900)]
resource-manager: fix wrong indentation in unset_resource_attr_interest
Fix the wrong indentation in unset_resource_attr_interest internal
function in order to improve the readability.
Change-Id: I07f3d84060d14c0d5cc141d74949900dd9fe11f0
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Youngjae Cho [Wed, 11 Jan 2023 01:56:27 +0000 (10:56 +0900)]
resource-manager: fix free_resource()
Change-Id: I15855cc6ce7eef4859a94fbc0d959d91abdd0c06
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Fri, 6 Jan 2023 03:04:34 +0000 (12:04 +0900)]
resource-manager: introduce sync getter
Sync getter fetches data after update.
Change-Id: I4610f99f1b4039b985890f77abb827a1174bf5dd
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 6 Dec 2022 02:15:52 +0000 (11:15 +0900)]
libgdbus: add dbus signal for power state change
Change-Id: I8b4b22f7bfb5e4d662ee531d5b170ada2f09acdf
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 6 Dec 2022 02:33:07 +0000 (11:33 +0900)]
resource-manager: add missing header
Change-Id: I3c1d4fb91d0ebbf784075c5b7bb5f6e49a0cc51a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Tue, 29 Nov 2022 02:30:19 +0000 (11:30 +0900)]
packaging: couple .spec version with .pc version
Change-Id: I2ccfce3f0afbfe66b2807858e7b081d7cbf022e5
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Dongwoo Lee [Thu, 20 Oct 2022 10:14:12 +0000 (19:14 +0900)]
libsyscommon v5.0.0
Changes from v4.1
- Add libsyscommon-resource-manager feature to handle the resource and
resource attribute based on ID.
- Newly added header files for resource-manager
1. usr/include/libsyscommon/resource-type.h
: Contain the supported resource data type and resource flag to
indicate the specific characteristic.
2. usr/include/libsyscommon/resource-manager.h
: Contain the resource handelr functions such as create/delete
resource, update the resource attributes and get value of resource attributes.
: Contain the structures for resource driver and attribute
3. usr/include/libsyscommon/resource-device.h
: Contain the resource_device structure and function to handle the
resource device data.
Change-Id: Id43eb66dc1797cf8838497ff0aaa37625ca6fe30
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Youngjae Cho [Fri, 4 Nov 2022 05:45:16 +0000 (14:45 +0900)]
resource-manager: operate based on resource id
All operations provided by resource-manager now work based on resource
"id" instead of resource "instance" itself. All resource "instances" are
managed within libsyscommon and it only exposes their id.
The resource-manager source code has been implemented based on the
coding rule below.
- An actual operating function has no prefix syscommon_resman_. It has
internal linkage and takes actual resource instance as a parameter.
e.g., get_resource_attr(struct syscommon_resman_resource *resource, ...)
- A function exposed through header is prefixed with syscommon_resman_
and it takes resource id as a parameter. It locates resource instance
using resource id and invokes matching function.
e.g., syscommon_resman_get_resource_attr(int resource_id, ...)
Change-Id: If82c58593b363433188bf01809dc57a242ede24f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Dongwoo Lee [Thu, 20 Oct 2022 07:27:30 +0000 (16:27 +0900)]
resource-manager: add system resource manager library
To provide system-wide unified resource framework, resource utilities in
resource monitor is extracted into this library.
Change-Id: I7ba90e3b1fda1b525a015bb46addd4d860045d6d
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
TaeminYeom [Wed, 24 Aug 2022 09:15:03 +0000 (18:15 +0900)]
Add extern "C" keyword in header files
Change-Id: Ie16f5ec1d1c18f5e20cd94d46ad63a3ad7ac58fc
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
Hyotaek Shim [Thu, 18 Aug 2022 07:40:18 +0000 (16:40 +0900)]
Relicense libsyscommon package as MIT to prevent license conflict issues
For example, Apache-2.0 is in conflict with GPL-2.0.
Change-Id: I52aff6d3d7083fa20939f1fd356c299ddc69e0cf
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Youngjae Cho [Thu, 9 Jun 2022 08:12:42 +0000 (17:12 +0900)]
ini-parser: check closing bracket when parsing section name
Change-Id: Ic939bfd6f57c9ee20e41fe7adf34f0debe3539e6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Hyotaek Shim [Sat, 28 May 2022 01:43:38 +0000 (10:43 +0900)]
Fix build errors - different header path
Public) /include/system/system_info.h
VD TV) /include/capi-system-info/system_info.h
Change-Id: Ibae5b76527051ecda6b7e24d546846886e8cb213
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Hyotaek Shim [Wed, 27 Apr 2022 02:44:15 +0000 (11:44 +0900)]
Add missing Requires to pkgconfig(capi-system-info)
Change-Id: I677a0b3995caaf937e54a318ea655b8822539cd6
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Youngjae Cho [Mon, 17 Jan 2022 05:17:58 +0000 (14:17 +0900)]
Fix build warnings
Change-Id: Ib5784f64fb176d2916f376ca4c0ca05d6e363c36
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Hyotaek Shim [Wed, 13 Apr 2022 02:26:17 +0000 (11:26 +0900)]
Add libsys_is_emulator() and refactor libsys_is_container()
Change-Id: Ic2cce60d76704803cd1c54aa70a9c795b92c9906
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
SangYoun Kwak [Wed, 6 Apr 2022 06:58:55 +0000 (15:58 +0900)]
Add description for the declaration of the file utils
Change-Id: Ia8367863a59fd3f31738fa62db1d0618c4e8ba5a
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Thu, 20 Jan 2022 05:14:21 +0000 (14:14 +0900)]
Check tmp buffer overflow
Change-Id: I5de5195293f72444d91d7b8f89f72bfe3ac5301e
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
Youngjae Cho [Thu, 23 Dec 2021 07:33:30 +0000 (16:33 +0900)]
ini-parser: add libsys_config_parse_by_section()
The original function, config_parse(), parses configuration file line by
line. Due to this, a parser, which is registered by the config_parse(),
can hardly handle out-of-ordered section/property or multiple sections
with same name.
The libsys_config_parse_by_section() now parses configuration file
by section. Therefore a parser can now find whole properties of a
section when the section is conveyed to the parser.
Change-Id: I08f09e2f6aefabea497393edb3c1f88dbe2d8850
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Mon, 20 Dec 2021 07:46:29 +0000 (16:46 +0900)]
file: add libsys_parse_cmdline_scanf()
libsys_parse_cmdline_scanf() scans tokens of file /proc/cmdline.
The parameters and return value have same semantics to those of
scanf() family.
Change-Id: Iac5838fe36b0ed2de36eb0412a13691ba0a50c3b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Thu, 9 Dec 2021 08:14:37 +0000 (17:14 +0900)]
Change interface DEVICED_INTERFACE_POWER
Change-Id: I3c605793fb70e4948c8a95dbb2d4c1bf4b75b39f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Unsung Lee [Tue, 19 Oct 2021 05:26:02 +0000 (14:26 +0900)]
Modify dbus object path
Change-Id: I6377613b93197d45e7873004767a22ddbedb68a1
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Youngjae Cho [Tue, 9 Nov 2021 01:18:17 +0000 (17:18 -0800)]
Fix svace issue
Change-Id: I920fbb2f16b8af7cf164c58a18a1eb6ff2f1db9a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Fri, 1 Oct 2021 09:10:18 +0000 (18:10 +0900)]
tests: add test running automatically on building
If the test fails, the whole build will fail.
Change-Id: Ibb88e60d13bcec09567630d051372fbcfbbb79da
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Yunmi Ha [Mon, 5 Jul 2021 11:47:06 +0000 (20:47 +0900)]
libcommon: add is_container function
Change-Id: I5ba0109e996b3f4e8ff939859499a3de8b623c90
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Youngjae Cho [Fri, 11 Jun 2021 06:12:50 +0000 (15:12 +0900)]
libcommon: bring file IO from deviced
Change-Id: I0068a42487b31881ff2c8f91de785ae8362984d4
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Youngjae Cho [Fri, 11 Jun 2021 06:09:02 +0000 (15:09 +0900)]
libcommon: fix indentation
Change-Id: Ib0af8672bfa8843050db917540c3ddfe91efbcff
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Hyotaek Shim [Thu, 22 Apr 2021 01:01:48 +0000 (10:01 +0900)]
Remove with_tizen build macro
Change-Id: I565075d4b1dbc99f73fd3bcc7afe5eb944bce854
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Hyotaek Shim [Fri, 19 Mar 2021 08:40:06 +0000 (17:40 +0900)]
Fix including libgdbus header libsystemd
Change-Id: I427757673726c8829a777d8667dcd096eb481a49
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
taemin.yeom [Fri, 19 Mar 2021 05:14:10 +0000 (14:14 +0900)]
Change dbus function name
Change-Id: I67b2b5d555db01ecbd32078380662e90f1dc3b6f
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
taemin.yeom [Thu, 11 Mar 2021 09:17:04 +0000 (18:17 +0900)]
Improve variable naming style
Change-Id: I5236467f2efbc7768f49028b09e0a758967fd979
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
taemin.yeom [Fri, 12 Mar 2021 02:02:08 +0000 (11:02 +0900)]
Add GVariant NULL check
Change-Id: I7278251402d76f4785b15b8fdc6724d80e59f642
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
Hyotaek Shim [Tue, 9 Mar 2021 04:24:11 +0000 (13:24 +0900)]
Rearrange header and source files
Change-Id: I7cb9725a5be1ac4ead7cac73d50203f413f669cf
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
taemin.yeom [Mon, 8 Mar 2021 08:23:27 +0000 (17:23 +0900)]
Restore gdbus APIs based on va_list
Change-Id: I9c275d6c652ac4253d3058fa3c022340ca55c6cd
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
taemin.yeom [Fri, 5 Mar 2021 05:38:18 +0000 (14:38 +0900)]
Improve error handling
Change-Id: I2db312e210c37a457eb874d41f1adcfb5700885a
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
taemin.yeom [Thu, 4 Mar 2021 06:20:57 +0000 (15:20 +0900)]
Change dbus handle method functions
change "dbus_handle_method_sync_var" and
"dbus_handle_method_with_unix_fd_list_sync_with_reply_var"
to add a return value indicating error results
Change-Id: Ib9063dc6811bb28e885f71e85b0253dfd6d303bc
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
taemin.yeom [Wed, 3 Mar 2021 07:54:50 +0000 (16:54 +0900)]
Change dbus_handle_method_sync_with_reply_var
to add a return value indicating error results.
Change-Id: I557c3fe79168076aaa9516f0c36eafd471e19c56
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
Hyotaek Shim [Thu, 4 Mar 2021 02:17:58 +0000 (11:17 +0900)]
Remove unused gdbus APIs based on char string
Change-Id: I6ddb7dd5948c5268f7da0b3977d25059b7898110
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Hyotaek Shim [Thu, 4 Mar 2021 02:08:12 +0000 (11:08 +0900)]
Remove unused gdbus APIs based on va_list
Change-Id: I0d858522fda0f49e0bda8f4b4b7178b9ca770429
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
lokilee73 [Fri, 5 Feb 2021 08:35:15 +0000 (17:35 +0900)]
Fix svace
Change-Id: I5397a386b95ed5fbaccda82a02a2b70026766044
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Fri, 5 Feb 2021 00:50:02 +0000 (09:50 +0900)]
Change dbus method name for pass SetScenario
Change-Id: I963a064da7d8f7a4cef14c2b4df30139d742c963
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Karol Lewandowski [Mon, 25 Jan 2021 16:57:49 +0000 (17:57 +0100)]
libgdbus: Return null when dbus connection fails
When libgdbus fails to get bus for one of global busses (system, session)
it still returns vaild pointer. It's because global busses are cached in
g_dh[2] which always exist.
This commit changes the get_connection function to return null for all the
checks like following to detect and fail in the case where getting bus was
unsuccessfull (ie. dbus-daemon isn't running in early boot/special targets)
dh = _dbus_handle_get_default_connection();
if (!dh) {
_E("failed to get default connection, bustype:%d", (int)dbus_handle_get_default_bus_type());
...
Change-Id: If85fe8e6cb7a5f95618df8f7f3fefa923e3e271a
INSUN PYO [Mon, 25 Jan 2021 04:12:12 +0000 (13:12 +0900)]
libsyscommon: add "Requires:pkgconfig(dlog)" to libsyscommon-devel
Change-Id: I7ab05dfddbf864490c191775a380cf639bfe4a54
Yunmi Ha [Thu, 21 Jan 2021 06:42:32 +0000 (15:42 +0900)]
libgdbus: fix destroy_func param of g_dbus_connection_signal_unsubscribe
Change-Id: Iecac374f5b0439f184afb3a5715f3d786c2ba931
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Mon, 18 Jan 2021 05:44:38 +0000 (14:44 +0900)]
libcommon: add file-io library
Change-Id: Ifa68bfc79bb96ab11d3f69338abf4c80e80608ea
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Wed, 6 Jan 2021 07:41:57 +0000 (16:41 +0900)]
libcommon: Change prefix of list definition
- LIST to SYS_G_LIST
Change-Id: Id160371e0f692010e1f602e5398206274c4cfbcf
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Yunmi Ha [Tue, 5 Jan 2021 04:45:21 +0000 (13:45 +0900)]
libcommon: Add common library
- list (glib)
- ini-parser
Change-Id: Ic13b47d5a1f26ed8b40007684da620a804775623
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
lokilee73 [Fri, 4 Dec 2020 01:06:33 +0000 (10:06 +0900)]
Remove unused path and interface for low power
Change-Id: I02dcb7b82c30c3c78a5af0c2ce204cff0c30b8ed
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Yunmi Ha [Tue, 17 Nov 2020 07:26:25 +0000 (16:26 +0900)]
Return -EPERM when get acces denied dbus error
Change-Id: Ib604ef0d837a93cf0d47f3de0ed4f2a207768987
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
lokilee73 [Thu, 10 Sep 2020 05:30:14 +0000 (14:30 +0900)]
Change function name
ex) dh_get_param_from_var to g_variant_get_safe
Change-Id: I85c9946996885fde44443c09c491c829903bc378
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Tue, 4 Aug 2020 02:14:22 +0000 (11:14 +0900)]
Add dbus path and interface for pass daemon
CPU pmqos request is done via dbus, when device sleeps or wakes up
Change-Id: Icf69f71f3b1a8046194040827b57de090a3582d4
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Mon, 29 Jun 2020 04:43:32 +0000 (13:43 +0900)]
Add dbus interface to broadcast key input values
Change-Id: I7b56e3dc794361d0ff3d60660b7fd7c91541c5b2
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
sanghyeok.oh [Thu, 7 May 2020 03:24:36 +0000 (12:24 +0900)]
Add api dbus_handle_emit_dbus_signal_sync()
* dbus_handle_emit_dbus_signal_sync()
Emit signal immediately.
* dbus_handle_flush_sync()
g_dbus_connection_flush_sync() wrapper
Change-Id: I67a79426c78be5f524e85b1786f777028d336ee9
Hyotaek Shim [Fri, 17 Apr 2020 06:36:15 +0000 (06:36 +0000)]
Merge "Fix build error with ENABLE_LIBDEVICED_DLOG option on Tizen 6.0" into tizen
INSUN PYO [Thu, 9 Apr 2020 00:19:43 +0000 (09:19 +0900)]
Fix build error with ENABLE_LIBDEVICED_DLOG option on Tizen 6.0
If NULL is passed as the %s argument of dlog, gcc reports an error.
Change-Id: Id70287787362f152efbbf5935c76646500321188
INSUN PYO [Thu, 9 Apr 2020 00:15:37 +0000 (09:15 +0900)]
Fix build warning on Tizen 6.0
[ 8s] In file included from /usr/include/string.h:494,
[ 8s] from /home/abuild/rpmbuild/BUILD/libsyscommon-4.1/src/libgdbus/dbus-systemd.c:21:
[ 8s] In function 'strncpy',
[ 8s] inlined from 'systemd_get_unit_dbus_path' at /home/abuild/rpmbuild/BUILD/libsyscommon-4.1/src/libgdbus/dbus-systemd.c:386:2:
[ 8s] /usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' output truncated before terminating nul copying 31 bytes from a string of the same length [-Wstringop-truncation]
[ 8s] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
Change-Id: Iaf5f71d7c364db91b495f50e63005778765ba359
sanghyeok.oh [Mon, 13 Jan 2020 07:52:46 +0000 (16:52 +0900)]
libgdbus: fix leak
Change-Id: Ib15167a5be404e8ca6f690efe269f7a407fefce0
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
sanghyeok.oh [Wed, 28 Aug 2019 06:11:04 +0000 (15:11 +0900)]
libgdbus: modify code style
Change-Id: Iea0fa1803e7d59bbdfdea54124cebd9d17c26858
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
sanghyeok.oh [Wed, 28 Aug 2019 02:31:07 +0000 (11:31 +0900)]
fix build warning
Change-Id: I5b3dab83dcf2ef1f4c4c61a6f27367595c8ef385
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
sanghyeok.oh [Fri, 16 Aug 2019 10:21:31 +0000 (19:21 +0900)]
re-arrange code
Change-Id: Ie2f9dcde57b411bd4b84206db2c91c4cae25e1e2
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
sanghyeok.oh [Fri, 16 Aug 2019 10:20:39 +0000 (19:20 +0900)]
libgdbus: seperate system-daemon's dbus interfaces from dbus-system.h
Change-Id: I4b3ec4dedc93652d426f98eff955e725e9ea1f3e
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
sanghyeok.oh [Fri, 16 Aug 2019 01:43:27 +0000 (10:43 +0900)]
libgdbus: change api name from broadcasting to emit
"Broadcast" is ambiguous due to the ability to send both broadcast and
unicast signals.
change 'dbus_handle_broadcast_dbus_signal' to 'dbus_handle_emit_dbus_signal'
Change-Id: I5f6f25f2dc74535f7dfc091106600d722f664b50
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
sanghyeok.oh [Wed, 14 Aug 2019 07:52:22 +0000 (16:52 +0900)]
libgdbus: modified to support unicast signal
Change-Id: I36085cf3d0f4e8e0fd3d78abc259b758112e9720
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
lokilee73 [Tue, 30 Jul 2019 05:16:19 +0000 (14:16 +0900)]
Change sensitivity interface to fix dbus error
Change-Id: Iefbd48ad9031388c149b5584d93c7398e5dae3d6
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
INSUN PYO [Mon, 1 Jul 2019 06:36:44 +0000 (15:36 +0900)]
Remove unused SYSTEMD_DBUS_SIGNAL_SYSTEM_STARTUP_FINISHED
Change-Id: I43f23baf7d8f159f76bc139889fceff7b8b0740a
Yunmi Ha [Mon, 8 Apr 2019 08:33:17 +0000 (17:33 +0900)]
Change library name to libsyscommon.
- Add new function for systemd state
Change-Id: Ie69b718918306fc55e6c801e4c8d0fcaa0ab79b0
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Hyotaek Shim [Mon, 25 Mar 2019 10:15:45 +0000 (19:15 +0900)]
Rename systemd_stop_unit_sync() to systemd_stop_unit_wait_stopped()
Change-Id: I5c8e321c84e7a54073d8830e7c810e1dae7e5210
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Hyotaek Shim [Fri, 22 Mar 2019 11:22:45 +0000 (20:22 +0900)]
Rename systemd_start_unit_sync() to systemd_start_unit_wait_started()
Change-Id: I2064b404c8ac562b7e952ca061b2159d0bc1876f
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Hyotaek Shim [Fri, 22 Mar 2019 11:25:04 +0000 (20:25 +0900)]
Add .gitignore
Change-Id: I41c66209d6456a02079416c226c147720e244346
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
sanghyeok.oh [Wed, 27 Feb 2019 11:00:17 +0000 (20:00 +0900)]
power: apply modified dbus spec
Change-Id: I4008f782ffa43a08a67516df7f99a53421b97969
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
lokilee73 [Mon, 7 Jan 2019 06:30:33 +0000 (15:30 +0900)]
Add Path and Interface for temperature
Change-Id: Icd52d21d0fa90f6367e4354598dd37b02dcc4957
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>