chiark / gitweb /
doc: disable "make check" for gtk-doc
[elogind.git] / src / udev / udev-builtin-usb_id.c
index 6481b35ae79ffc968003eccef17df88f74daf5c7..7ce401d15253ac6c3081c18069ad6386b4bec458 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (c) 2005 SUSE Linux Products GmbH, Germany
  *   Author: Hannes Reinecke <hare@suse.de>
  *
- * Copyright (C) 2005-2011 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2005-2011 Kay Sievers <kay@vrfy.org>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@
 
 static void set_usb_iftype(char *to, int if_class_num, size_t len)
 {
-        char *type = "generic";
+        const char *type = "generic";
 
         switch (if_class_num) {
         case 1:
@@ -86,7 +86,7 @@ static int set_usb_mass_storage_ifsubtype(char *to, const char *from, size_t len
 {
         int type_num = 0;
         char *eptr;
-        char *type = "generic";
+        const char *type = "generic";
 
         type_num = strtoul(from, &eptr, 0);
         if (eptr != from) {
@@ -111,7 +111,7 @@ static int set_usb_mass_storage_ifsubtype(char *to, const char *from, size_t len
                         break;
                 }
         }
-        util_strscpy(to, len, type);
+        strscpy(to, len, type);
         return type_num;
 }
 
@@ -119,7 +119,7 @@ static void set_scsi_type(char *to, const char *from, size_t len)
 {
         int type_num;
         char *eptr;
-        char *type = "generic";
+        const char *type = "generic";
 
         type_num = strtoul(from, &eptr, 0);
         if (eptr != from) {
@@ -143,7 +143,7 @@ static void set_scsi_type(char *to, const char *from, size_t len)
                         break;
                 }
         }
-        util_strscpy(to, len, type);
+        strscpy(to, len, type);
 }
 
 #define USB_DT_DEVICE                        0x01
@@ -256,7 +256,6 @@ static int builtin_usb_id(struct udev_device *dev, int argc, char *argv[], bool
         const char *driver = NULL;
         char serial[256];
 
-        struct udev *udev = udev_device_get_udev(dev);
         struct udev_device *dev_interface = NULL;
         struct udev_device *dev_usb = NULL;
         const char *if_class, *if_subclass;
@@ -439,12 +438,12 @@ fallback:
         }
 
         s = serial;
-        l = util_strpcpyl(&s, sizeof(serial), vendor_str, "_", model_str, NULL);
+        l = strpcpyl(&s, sizeof(serial), vendor_str, "_", model_str, NULL);
         if (serial_str[0] != '\0')
-                l = util_strpcpyl(&s, l, "_", serial_str, NULL);
+                l = strpcpyl(&s, l, "_", serial_str, NULL);
 
         if (instance_str[0] != '\0')
-                util_strpcpyl(&s, l, "-", instance_str, NULL);
+                strpcpyl(&s, l, "-", instance_str, NULL);
 
         udev_builtin_add_property(dev, test, "ID_VENDOR", vendor_str);
         udev_builtin_add_property(dev, test, "ID_VENDOR_ENC", vendor_str_enc);