diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-01-25 01:28:31 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-01-25 01:28:31 +0100 |
commit | a9bd2ed84a7b0871c281adc8226f12ae46da4de0 (patch) | |
tree | d8493c0d22d31cb4c807838dad07874be426dd25 | |
parent | 4a2c3aad07a97845ac61701d750cbf6487b36c77 (diff) |
rename apply_format() cause it is public now
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
-rw-r--r-- | udev.c | 2 | ||||
-rw-r--r-- | udev_rules.c | 16 | ||||
-rw-r--r-- | udev_rules.h | 4 | ||||
-rw-r--r-- | udevd.c | 2 | ||||
-rw-r--r-- | udevstart.c | 2 |
5 files changed, 13 insertions, 13 deletions
@@ -165,7 +165,7 @@ int main(int argc, char *argv[], char *envp[]) char program[PATH_SIZE]; strlcpy(program, name_loop->name, sizeof(program)); - apply_format(udev, program, sizeof(program)); + udev_rules_apply_format(udev, program, sizeof(program)); run_program(program, udev->dev->subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO)); } } diff --git a/udev_rules.c b/udev_rules.c index fbcbbe0083..90dc0243fe 100644 --- a/udev_rules.c +++ b/udev_rules.c @@ -362,7 +362,7 @@ static int wait_for_sysfs(struct udevice *udev, const char *file, int timeout) return -1; } -void apply_format(struct udevice *udev, char *string, size_t maxsize) +void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize) { char temp[PATH_SIZE]; char temp2[PATH_SIZE]; @@ -818,7 +818,7 @@ try_parent: char result[PATH_SIZE]; strlcpy(program, key_val(rule, &rule->program), sizeof(program)); - apply_format(udev, program, sizeof(program)); + udev_rules_apply_format(udev, program, sizeof(program)); if (run_program(program, udev->dev->subsystem, result, sizeof(result), NULL, (udev_log_priority >= LOG_INFO)) != 0) { dbg("PROGRAM is false"); udev->program_result[0] = '\0'; @@ -851,7 +851,7 @@ try_parent: int rc = -1; strlcpy(import, key_val(rule, &rule->import), sizeof(import)); - apply_format(udev, import, sizeof(import)); + udev_rules_apply_format(udev, import, sizeof(import)); dbg("check for IMPORT import='%s'", import); if (rule->import_type == IMPORT_PROGRAM) { rc = import_program_into_env(udev, import); @@ -941,14 +941,14 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) if (rule->owner.operation == KEY_OP_ASSIGN_FINAL) udev->owner_final = 1; strlcpy(udev->owner, key_val(rule, &rule->owner), sizeof(udev->owner)); - apply_format(udev, udev->owner, sizeof(udev->owner)); + udev_rules_apply_format(udev, udev->owner, sizeof(udev->owner)); dbg("applied owner='%s' to '%s'", udev->owner, udev->dev->kernel_name); } if (!udev->group_final && rule->group.operation != KEY_OP_UNSET) { if (rule->group.operation == KEY_OP_ASSIGN_FINAL) udev->group_final = 1; strlcpy(udev->group, key_val(rule, &rule->group), sizeof(udev->group)); - apply_format(udev, udev->group, sizeof(udev->group)); + udev_rules_apply_format(udev, udev->group, sizeof(udev->group)); dbg("applied group='%s' to '%s'", udev->group, udev->dev->kernel_name); } @@ -965,7 +965,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) name_list_cleanup(&udev->symlink_list); } strlcpy(temp, key_val(rule, &rule->symlink), sizeof(temp)); - apply_format(udev, temp, sizeof(temp)); + udev_rules_apply_format(udev, temp, sizeof(temp)); count = replace_untrusted_chars(temp); if (count) info("%i untrusted character(s) replaced" , count); @@ -996,7 +996,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev) int count; name_set = 1; strlcpy(udev->name, key_val(rule, &rule->name), sizeof(udev->name)); - apply_format(udev, udev->name, sizeof(udev->name)); + udev_rules_apply_format(udev, udev->name, sizeof(udev->name)); count = replace_untrusted_chars(udev->name); if (count) info("%i untrusted character(s) replaced", count); @@ -1082,7 +1082,7 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev) name_list_cleanup(&udev->run_list); } strlcpy(program, key_val(rule, &rule->run), sizeof(program)); - apply_format(udev, program, sizeof(program)); + udev_rules_apply_format(udev, program, sizeof(program)); dbg("add run '%s'", program); name_list_add(&udev->run_list, program, 0); if (rule->run.operation == KEY_OP_ASSIGN_FINAL) diff --git a/udev_rules.h b/udev_rules.h index b183d9b531..e4d5ebd765 100644 --- a/udev_rules.h +++ b/udev_rules.h @@ -105,8 +105,6 @@ struct udev_rules { extern int udev_rules_init(struct udev_rules *rules, int resolve_names); extern void udev_rules_cleanup(struct udev_rules *rules); -extern void apply_format(struct udevice *udev, char *string, size_t maxsize); - extern void udev_rules_iter_init(struct udev_rules *rules); extern struct udev_rule *udev_rules_iter_next(struct udev_rules *rules); extern struct udev_rule *udev_rules_iter_label(struct udev_rules *rules, const char *label); @@ -114,4 +112,6 @@ extern struct udev_rule *udev_rules_iter_label(struct udev_rules *rules, const c extern int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev); extern int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev); +extern void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize); + #endif @@ -127,7 +127,7 @@ static int udev_event_process(struct uevent_msg *msg) char program[PATH_SIZE]; strlcpy(program, name_loop->name, sizeof(program)); - apply_format(udev, program, sizeof(program)); + udev_rules_apply_format(udev, program, sizeof(program)); if (run_program(program, udev->dev->subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO))) retval = -1; diff --git a/udevstart.c b/udevstart.c index 11bdf79183..fdb2ae3808 100644 --- a/udevstart.c +++ b/udevstart.c @@ -164,7 +164,7 @@ run: char program[PATH_SIZE]; strlcpy(program, name_loop->name, sizeof(program)); - apply_format(udev, program, sizeof(program)); + udev_rules_apply_format(udev, program, sizeof(program)); run_program(program, udev->dev->subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO)); } } |