chiark / gitweb /
rename ...trailing_char() to ...trailing_chars()
authorKay Sievers <kay.sievers@suse.de>
Sun, 28 Aug 2005 21:15:51 +0000 (23:15 +0200)
committerKay Sievers <kay.sievers@suse.de>
Sun, 28 Aug 2005 21:15:51 +0000 (23:15 +0200)
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
udev_config.c
udev_device.c
udev_rules.c
udev_utils.h
udev_utils_string.c

index f0b409b0676fb9926ab5f14923393b748296b0fd..b8c4ffc8edbfa0d2e23ea73b195f731042d8a992 100644 (file)
@@ -149,19 +149,19 @@ static int parse_config_file(void)
 
                if (strcasecmp(variable, "udev_root") == 0) {
                        strlcpy(udev_root, value, sizeof(udev_root));
 
                if (strcasecmp(variable, "udev_root") == 0) {
                        strlcpy(udev_root, value, sizeof(udev_root));
-                       remove_trailing_char(udev_root, '/');
+                       remove_trailing_chars(udev_root, '/');
                        continue;
                }
 
                if (strcasecmp(variable, "udev_db") == 0) {
                        strlcpy(udev_db_path, value, sizeof(udev_db_path));
                        continue;
                }
 
                if (strcasecmp(variable, "udev_db") == 0) {
                        strlcpy(udev_db_path, value, sizeof(udev_db_path));
-                       remove_trailing_char(udev_db_path, '/');
+                       remove_trailing_chars(udev_db_path, '/');
                        continue;
                }
 
                if (strcasecmp(variable, "udev_rules") == 0) {
                        strlcpy(udev_rules_filename, value, sizeof(udev_rules_filename));
                        continue;
                }
 
                if (strcasecmp(variable, "udev_rules") == 0) {
                        strlcpy(udev_rules_filename, value, sizeof(udev_rules_filename));
-                       remove_trailing_char(udev_rules_filename, '/');
+                       remove_trailing_chars(udev_rules_filename, '/');
                        continue;
                }
 
                        continue;
                }
 
@@ -195,7 +195,7 @@ void udev_init_config(void)
        env = getenv("UDEV_CONFIG_FILE");
        if (env) {
                strlcpy(udev_config_filename, env, sizeof(udev_config_filename));
        env = getenv("UDEV_CONFIG_FILE");
        if (env) {
                strlcpy(udev_config_filename, env, sizeof(udev_config_filename));
-               remove_trailing_char(udev_config_filename, '/');
+               remove_trailing_chars(udev_config_filename, '/');
        }
 
        parse_config_file();
        }
 
        parse_config_file();
index db72d3007de88e86d66758f027aa1276bb410261..ad6f7063668252350fd62c54173637655f557b79 100644 (file)
@@ -58,7 +58,7 @@ int udev_init_device(struct udevice *udev, const char* devpath, const char *subs
 
        if (devpath) {
                strlcpy(udev->devpath, devpath, sizeof(udev->devpath));
 
        if (devpath) {
                strlcpy(udev->devpath, devpath, sizeof(udev->devpath));
-               remove_trailing_char(udev->devpath, '/');
+               remove_trailing_chars(udev->devpath, '/');
 
                if (strncmp(udev->devpath, "/block/", 7) == 0)
                        udev->type = DEV_BLOCK;
 
                if (strncmp(udev->devpath, "/block/", 7) == 0)
                        udev->type = DEV_BLOCK;
index c1482c34b50be4a126927760c693c652361be29b..459c27b4d55bafc755a163dcdf418a880044ea11 100644 (file)
@@ -326,7 +326,7 @@ static int find_sysfs_attribute(struct sysfs_class_device *class_dev, struct sys
 
 attr_found:
        strlcpy(value, tmpattr->value, len);
 
 attr_found:
        strlcpy(value, tmpattr->value, len);
-       remove_trailing_char(value, '\n');
+       remove_trailing_chars(value, '\n');
 
        dbg("found attribute '%s'", tmpattr->path);
        return 0;
 
        dbg("found attribute '%s'", tmpattr->path);
        return 0;
@@ -818,7 +818,7 @@ try_parent:
                        int count;
 
                        dbg("PROGRAM matches");
                        int count;
 
                        dbg("PROGRAM matches");
-                       remove_trailing_char(result, '\n');
+                       remove_trailing_chars(result, '\n');
                        count = replace_untrusted_chars(result);
                        if (count)
                                info("%i untrusted character(s) replaced" , count);
                        count = replace_untrusted_chars(result);
                        if (count)
                                info("%i untrusted character(s) replaced" , count);
index 9ff79113b16a7bd71c496155c8324c9257636b85..ea39a028f561495f2fcb9dcb0291e2d48cdc8341 100644 (file)
@@ -46,7 +46,7 @@ extern int add_matching_files(struct list_head *name_list, const char *dirname,
 /* udev_utils_string.c */
 extern int strcmp_pattern(const char *p, const char *s);
 extern int string_is_true(const char *str);
 /* udev_utils_string.c */
 extern int strcmp_pattern(const char *p, const char *s);
 extern int string_is_true(const char *str);
-extern void remove_trailing_char(char *path, char c);
+extern void remove_trailing_chars(char *path, char c);
 extern int utf8_encoded_valid_unichar(const char *str);
 extern int replace_untrusted_chars(char *str);
 
 extern int utf8_encoded_valid_unichar(const char *str);
 extern int replace_untrusted_chars(char *str);
 
index bb5677d46ebbcc5395d904b5918a815b40be53fc..37db8dbc8524683a937009aa0fd41c620642f69d 100644 (file)
@@ -100,7 +100,7 @@ int string_is_true(const char *str)
        return 0;
 }
 
        return 0;
 }
 
-void remove_trailing_char(char *path, char c)
+void remove_trailing_chars(char *path, char c)
 {
        size_t len;
 
 {
        size_t len;