X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=libudev%2Flibudev-device.c;h=7644e6c63d26ad192b704665d2b835268f03b127;hp=669c51e35bb7617f24bfb153d0b4061003603dda;hb=456719b6f941d917e7c9444fa6149f35a188d785;hpb=8d6bc73aefb5dcfd36d9456ab2209bc410086f82 diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c index 669c51e35..7644e6c63 100644 --- a/libudev/libudev-device.c +++ b/libudev/libudev-device.c @@ -961,7 +961,7 @@ unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device) * @udev_device: udev device * @sysattr: attribute name * - * The retrieved value is cached in the device. Repeated reads will return the same + * The retrieved value is cached in the device. Repeated calls will return the same * value and not open the attribute again. * * Returns: the content of a sys attribute file, or #NULL if there is no sys attribute value. @@ -1211,14 +1211,20 @@ static int update_envp_monitor_buf(struct udev_device *udev_device) s = udev_device->monitor_buf; l = MONITOR_BUF_SIZE; udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) { + const char *key; + + key = udev_list_entry_get_name(list_entry); + /* skip private variables */ + if (key[0] == '.') + continue; + /* add string to envp array */ udev_device->envp[i++] = s; if (i+1 >= ENVP_SIZE) return -EINVAL; /* add property string to monitor buffer */ - l = util_strpcpyl(&s, l, udev_list_entry_get_name(list_entry), "=", - udev_list_entry_get_value(list_entry), NULL); + l = util_strpcpyl(&s, l, key, "=", udev_list_entry_get_value(list_entry), NULL); if (l == 0) return -EINVAL; s++;