/*
* libudev - interface to udev device information
*
- * Copyright (C) 2008-2009 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2008-2010 Kay Sievers <kay.sievers@vrfy.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
if (list_entry == NULL)
return -ENOMEM;
if (unique)
- udev_list_entry_set_flag(list_entry, 1);
+ udev_list_entry_set_flags(list_entry, 1);
return 0;
}
struct udev_list_entry *udev_device_add_property_from_string(struct udev_device *udev_device, const char *property)
{
- char name[UTIL_PATH_SIZE];
+ char name[UTIL_LINE_SIZE];
char *val;
util_strscpy(name, sizeof(name), property);
l = util_strpcpyl(&s, l, key, "=", udev_list_entry_get_value(list_entry), NULL);
if (l == 0)
return -EINVAL;
+ /* advance past the trailing '\0' that util_strpcpyl() guarantees */
s++;
+ l--;
}
udev_device->envp[i] = NULL;
udev_device->monitor_buf_len = s - udev_device->monitor_buf;