diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-28 04:50:28 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-28 04:50:28 +0100 |
commit | 1c24e7bd1286d16a7125aeeee0470ea0685c8318 (patch) | |
tree | fbecbcfbbf2c2d6874e3148f98a7aa7d06c851ff | |
parent | 35355baba1feec37bf9f22e3a0e18f495fcf6014 (diff) |
Use @ instead = as abstract namespace socket prefix
@ makes more sense since the NUL addr contained in the sockaddr's
sun_path field can also be written as ^@.
Also, in the .socket files writing "ListenStream==foo" is kinda ugly.
Finally, tools like strace decode it with an @ too.
-rw-r--r-- | socket-util.c | 4 | ||||
-rw-r--r-- | test1/systemd-logger.socket | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/socket-util.c b/socket-util.c index 46a6e91bb0..0282dd2f3f 100644 --- a/socket-util.c +++ b/socket-util.c @@ -69,7 +69,7 @@ int socket_address_parse(SocketAddress *a, const char *s) { memcpy(a->sockaddr.un.sun_path, s, l); a->size = sizeof(sa_family_t) + l + 1; - } else if (*s == '=') { + } else if (*s == '@') { /* Abstract AF_UNIX socket */ size_t l; @@ -261,7 +261,7 @@ int socket_address_print(const SocketAddress *a, char **p) { if (!(ret = new(char, sizeof(a->sockaddr.un.sun_path)+1))) return -ENOMEM; - ret[0] = '='; + ret[0] = '@'; memcpy(ret+1, a->sockaddr.un.sun_path+1, sizeof(a->sockaddr.un.sun_path)-1); ret[sizeof(a->sockaddr.un.sun_path)] = 0; diff --git a/test1/systemd-logger.socket b/test1/systemd-logger.socket index 3f05363ccd..c964ab7da5 100644 --- a/test1/systemd-logger.socket +++ b/test1/systemd-logger.socket @@ -2,4 +2,4 @@ Description=systemd Logging Socket [Socket] -ListenStream==/systemd/logger +ListenStream=@/systemd/logger |