summaryrefslogtreecommitdiff
path: root/src/shared/util.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-09-18 12:12:04 -0400
committerDave Reisner <dreisner@archlinux.org>2013-09-19 11:50:34 -0400
commit8f6ce71fe79d897b67157d92869db87ee2042af6 (patch)
tree30055a64faf4d6b3aeb0ba84979627a4a23c16b3 /src/shared/util.c
parent7991ac34ab08421415b907e42775c5539a4a5bbb (diff)
device-nodes: move device node specific code to own file
In the process, rename udev_encode_string which is poorly named for what it does. It deals specifically with encoding names that udev creates and has its own rules: utf8 is valid but some ascii is not (e.g. path separators), and everything else is simply escaped. Rename it to encode_devnode_name.
Diffstat (limited to 'src/shared/util.c')
-rw-r--r--src/shared/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 2b76a5c885..200955376e 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -73,7 +73,7 @@
#include "hashmap.h"
#include "env-util.h"
#include "fileio.h"
-#include "utf8.h"
+#include "device-nodes.h"
int saved_argc = 0;
char **saved_argv = NULL;
@@ -3509,7 +3509,7 @@ static char *tag_to_udev_node(const char *tagvalue, const char *by) {
if (t == NULL)
return NULL;
- if (udev_encode_string(u, t, enc_len) < 0)
+ if (encode_devnode_name(u, t, enc_len) < 0)
return NULL;
if (asprintf(&dn, "/dev/disk/by-%s/%s", by, t) < 0)