mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-12 09:17:44 +03:00
rename ...trailing_char() to ...trailing_chars()
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This commit is contained in:
parent
d2ecd6a19d
commit
b2c6818dc3
@ -149,19 +149,19 @@ static int parse_config_file(void)
|
||||
|
||||
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));
|
||||
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));
|
||||
remove_trailing_char(udev_rules_filename, '/');
|
||||
remove_trailing_chars(udev_rules_filename, '/');
|
||||
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));
|
||||
remove_trailing_char(udev_config_filename, '/');
|
||||
remove_trailing_chars(udev_config_filename, '/');
|
||||
}
|
||||
|
||||
parse_config_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));
|
||||
remove_trailing_char(udev->devpath, '/');
|
||||
remove_trailing_chars(udev->devpath, '/');
|
||||
|
||||
if (strncmp(udev->devpath, "/block/", 7) == 0)
|
||||
udev->type = DEV_BLOCK;
|
||||
|
@ -326,7 +326,7 @@ static int find_sysfs_attribute(struct sysfs_class_device *class_dev, struct sys
|
||||
|
||||
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;
|
||||
@ -818,7 +818,7 @@ try_parent:
|
||||
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);
|
||||
|
@ -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);
|
||||
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);
|
||||
|
||||
|
@ -100,7 +100,7 @@ int string_is_true(const char *str)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void remove_trailing_char(char *path, char c)
|
||||
void remove_trailing_chars(char *path, char c)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user