summaryrefslogtreecommitdiff
path: root/udev_utils.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-07-14 20:43:01 +0200
committerKay Sievers <kay.sievers@vrfy.org>2007-07-14 20:43:01 +0200
commit4110664d4f25f203b7d76ee56e5e23220b04eb69 (patch)
treed8f23e676d323fbd7dfbdde87d622cdff63c0b04 /udev_utils.c
parent285e2a24f67b1c09d7b4c54587802fc0a9d623eb (diff)
add option to RUN key to ignore the return value of the program
Diffstat (limited to 'udev_utils.c')
-rw-r--r--udev_utils.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/udev_utils.c b/udev_utils.c
index 6d646b0ee6..e2f84cf24a 100644
--- a/udev_utils.c
+++ b/udev_utils.c
@@ -54,7 +54,7 @@ int log_priority(const char *priority)
return 0;
}
-char *name_list_add(struct list_head *name_list, const char *name, int sort)
+struct name_entry *name_list_add(struct list_head *name_list, const char *name, int sort)
{
struct name_entry *loop_name;
struct name_entry *new_name;
@@ -63,7 +63,7 @@ char *name_list_add(struct list_head *name_list, const char *name, int sort)
/* avoid doubles */
if (strcmp(loop_name->name, name) == 0) {
dbg("'%s' is already in the list", name);
- return loop_name->name;
+ return loop_name;
}
}
@@ -81,10 +81,10 @@ char *name_list_add(struct list_head *name_list, const char *name, int sort)
dbg("adding '%s'", new_name->name);
list_add_tail(&new_name->node, &loop_name->node);
- return new_name->name;
+ return new_name;
}
-char *name_list_key_add(struct list_head *name_list, const char *key, const char *value)
+struct name_entry *name_list_key_add(struct list_head *name_list, const char *key, const char *value)
{
struct name_entry *loop_name;
struct name_entry *new_name;
@@ -94,7 +94,7 @@ char *name_list_key_add(struct list_head *name_list, const char *key, const char
dbg("key already present '%s', replace it", loop_name->name);
snprintf(loop_name->name, sizeof(loop_name->name), "%s=%s", key, value);
loop_name->name[sizeof(loop_name->name)-1] = '\0';
- return loop_name->name;
+ return loop_name;
}
}
@@ -107,7 +107,7 @@ char *name_list_key_add(struct list_head *name_list, const char *key, const char
dbg("adding '%s'", new_name->name);
list_add_tail(&new_name->node, &loop_name->node);
- return new_name->name;
+ return new_name;
}
int name_list_key_remove(struct list_head *name_list, const char *key)