summaryrefslogtreecommitdiff
path: root/extras/usb_id
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-09-10 18:59:42 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-09-10 18:59:42 +0200
commit31c1f537450e96f8ddd6a0fad2adaefe57996f03 (patch)
tree816bab62c1215cd2886dd0d238ff30dbfd032ff0 /extras/usb_id
parentecc9ec579feb4b7cc86bcf7caed3cb841faf3c9e (diff)
get rid of udev_sysdeps.c
Diffstat (limited to 'extras/usb_id')
-rw-r--r--extras/usb_id/Makefile.am1
-rw-r--r--extras/usb_id/usb_id.c22
2 files changed, 11 insertions, 12 deletions
diff --git a/extras/usb_id/Makefile.am b/extras/usb_id/Makefile.am
index eac385c3c1..c8d743b5f4 100644
--- a/extras/usb_id/Makefile.am
+++ b/extras/usb_id/Makefile.am
@@ -12,7 +12,6 @@ usb_id_SOURCES = \
../../udev/lib/libudev.h \
../../udev/lib/libudev.c \
../../udev/lib/libudev-util.c \
- ../../udev/udev_sysdeps.c \
../../udev/udev_sysfs.c \
../../udev/udev_utils.c
diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c
index fb4c28ac3e..9938dc00ef 100644
--- a/extras/usb_id/usb_id.c
+++ b/extras/usb_id/usb_id.c
@@ -147,7 +147,7 @@ static int set_usb_mass_storage_ifsubtype(char *to, const char *from, size_t len
break;
}
}
- strlcpy(to, type, len);
+ util_strlcpy(to, type, len);
return type_num;
}
@@ -180,7 +180,7 @@ static void set_scsi_type(char *to, const char *from, size_t len)
break;
}
}
- strlcpy(to, type, len);
+ util_strlcpy(to, type, len);
}
/*
@@ -408,14 +408,14 @@ int main(int argc, char **argv)
env = getenv("DEVPATH");
if (env != NULL)
- strlcpy(devpath, env, sizeof(devpath));
+ util_strlcpy(devpath, env, sizeof(devpath));
else {
if (argv[optind] == NULL) {
fprintf(stderr, "No device specified\n");
retval = 1;
goto exit;
}
- strlcpy(devpath, argv[optind], sizeof(devpath));
+ util_strlcpy(devpath, argv[optind], sizeof(devpath));
}
retval = usb_id(udev, devpath);
@@ -423,16 +423,16 @@ int main(int argc, char **argv)
if (retval == 0) {
char serial[256];
- strlcpy(serial, vendor_str, sizeof(serial));
- strlcat(serial, "_", sizeof(serial));
- strlcat(serial, model_str, sizeof(serial));
+ util_strlcpy(serial, vendor_str, sizeof(serial));
+ util_strlcat(serial, "_", sizeof(serial));
+ util_strlcat(serial, model_str, sizeof(serial));
if (serial_str[0] != '\0') {
- strlcat(serial, "_", sizeof(serial));
- strlcat(serial, serial_str, sizeof(serial));
+ util_strlcat(serial, "_", sizeof(serial));
+ util_strlcat(serial, serial_str, sizeof(serial));
}
if (instance_str[0] != '\0') {
- strlcat(serial, "-", sizeof(serial));
- strlcat(serial, instance_str, sizeof(serial));
+ util_strlcat(serial, "-", sizeof(serial));
+ util_strlcat(serial, instance_str, sizeof(serial));
}
if (export) {