sd-device,libudev: make an argument for *_set_sysattr_value() const

master
Yu Watanabe 4 years ago
parent 7f9e03952a
commit 8aae9a66fa
  1. 2
      TODO
  2. 2
      src/libsystemd/sd-device/sd-device.c
  3. 2
      src/libudev/libudev-device.c
  4. 2
      src/libudev/libudev.h
  5. 2
      src/systemd/sd-device.h

@ -438,8 +438,6 @@ Features:
* hostnamectl: show root image uuid
* sysfs set api in libudev is not const
* Find a solution for SMACK capabilities stuff:
http://lists.freedesktop.org/archives/systemd-devel/2014-December/026188.html

@ -1822,7 +1822,7 @@ static void device_remove_sysattr_value(sd_device *device, const char *_key) {
/* set the attribute and save it in the cache. If a NULL value is passed the
* attribute is cleared from the cache */
_public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, char *_value) {
_public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, const char *_value) {
_cleanup_close_ int fd = -1;
_cleanup_free_ char *value = NULL;
const char *syspath;

@ -763,7 +763,7 @@ _public_ const char *udev_device_get_sysattr_value(struct udev_device *udev_devi
*
* Returns: Negative error code on failure or 0 on success.
**/
_public_ int udev_device_set_sysattr_value(struct udev_device *udev_device, const char *sysattr, char *value) {
_public_ int udev_device_set_sysattr_value(struct udev_device *udev_device, const char *sysattr, const char *value) {
int r;
assert_return(udev_device, -EINVAL);

@ -90,7 +90,7 @@ const char *udev_device_get_action(struct udev_device *udev_device);
unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device);
unsigned long long int udev_device_get_usec_since_initialized(struct udev_device *udev_device);
const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const char *sysattr);
int udev_device_set_sysattr_value(struct udev_device *udev_device, const char *sysattr, char *value);
int udev_device_set_sysattr_value(struct udev_device *udev_device, const char *sysattr, const char *value);
int udev_device_has_tag(struct udev_device *udev_device, const char *tag);
/*

@ -68,7 +68,7 @@ int sd_device_has_tag(sd_device *device, const char *tag);
int sd_device_get_property_value(sd_device *device, const char *key, const char **value);
int sd_device_get_sysattr_value(sd_device *device, const char *sysattr, const char **_value);
int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, char *value);
int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, const char *value);
/* device enumerator */

Loading…
Cancel
Save