chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
automount: implement automount unit type
[elogind.git]
/
unit-name.c
diff --git
a/unit-name.c
b/unit-name.c
index eb2f704e2f7f4d61319d1a1f8de230dc8b3c4515..5053d30f29a4721a6b5b43671a8400cacff93de8 100644
(file)
--- a/
unit-name.c
+++ b/
unit-name.c
@@
-207,8
+207,8
@@
static char* do_escape(const char *f, char *t) {
for (; *f; f++) {
if (*f == '/')
for (; *f; f++) {
if (*f == '/')
- *(t++) = '
.
';
- else if (*f == '
.
' || *f == '\\' || !strchr(VALID_CHARS, *f)) {
+ *(t++) = '
-
';
+ else if (*f == '
-
' || *f == '\\' || !strchr(VALID_CHARS, *f)) {
*(t++) = '\\';
*(t++) = 'x';
*(t++) = hexchar(*f > 4);
*(t++) = '\\';
*(t++) = 'x';
*(t++) = hexchar(*f > 4);
@@
-286,7
+286,7
@@
char *unit_name_unescape(const char *f) {
return NULL;
for (t = r; *f; f++) {
return NULL;
for (t = r; *f; f++) {
- if (*f == '
.
')
+ if (*f == '
-
')
*(t++) = '/';
else if (*f == '\\') {
int a, b;
*(t++) = '/';
else if (*f == '\\') {
int a, b;