summaryrefslogtreecommitdiff
path: root/src/udev/udevadm-trigger.c
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2013-07-07 11:07:06 -0400
committerAnthony G. Basile <blueness@gentoo.org>2013-07-07 11:16:55 -0400
commitfaa1ff8ef8d98fe148ac0efab15fcdf0cabdcaae (patch)
tree4f0816897494168e1d0bab25367fb5b6782aaaa4 /src/udev/udevadm-trigger.c
parent44e6f1bc1a3f11daf569d310de1707f3b423786a (diff)
Import strxcpyx from upstream
This commit imports strxcpyx from upstream. This is upstream commit d5a89d7dc17a5ba5cf4fc71f82963c5c94a31c3d Note: there were also some very minor code cleanups to accelerometer.c: line 187 collect.c: lines 35, 140 libudev-device.c: line 780 libudev-hwdb.c: line 300 These are part of upstream commits: 507f22bd0172bff5e5d98145b1419bd472a2c57f 3cf7b686e6b29f78de0af5929602cae4482f6d49 67410e9f73a6cdd8453c78b966451b5151def14a Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udevadm-trigger.c')
-rw-r--r--src/udev/udevadm-trigger.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c
index d8960f997d..f472996965 100644
--- a/src/udev/udevadm-trigger.c
+++ b/src/udev/udevadm-trigger.c
@@ -48,7 +48,7 @@ static void exec_list(struct udev_enumerate *udev_enumerate, const char *action)
printf("%s\n", udev_list_entry_get_name(entry));
if (dry_run)
continue;
- util_strscpyl(filename, sizeof(filename), udev_list_entry_get_name(entry), "/uevent", NULL);
+ strscpyl(filename, sizeof(filename), udev_list_entry_get_name(entry), "/uevent", NULL);
fd = open(filename, O_WRONLY);
if (fd < 0)
continue;
@@ -62,7 +62,7 @@ static const char *keyval(const char *str, const char **val, char *buf, size_t s
{
char *pos;
- util_strscpy(buf, size,str);
+ strscpy(buf, size,str);
pos = strchr(buf, '=');
if (pos != NULL) {
pos[0] = 0;
@@ -122,9 +122,9 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[])
dry_run = 1;
break;
case 't':
- if (strcmp(optarg, "devices") == 0) {
+ if (streq(optarg, "devices")) {
device_type = TYPE_DEVICES;
- } else if (strcmp(optarg, "subsystems") == 0) {
+ } else if (streq(optarg, "subsystems")) {
device_type = TYPE_SUBSYSTEMS;
} else {
log_error("unknown type --type=%s\n", optarg);
@@ -165,9 +165,9 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[])
/* add sys dir if needed */
if (!startswith(optarg, "/sys"))
- util_strscpyl(path, sizeof(path), "/sys", optarg, NULL);
+ strscpyl(path, sizeof(path), "/sys", optarg, NULL);
else
- util_strscpy(path, sizeof(path), optarg);
+ strscpy(path, sizeof(path), optarg);
util_remove_trailing_chars(path, '/');
dev = udev_device_new_from_syspath(udev, path);
if (dev == NULL) {