mirror of
https://github.com/troglobit/finit.git
synced 2026-11-09 16:21:24 +00:00
Fix tty default :ID => tty:S0 instead of tty:ttyS0
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
25683221cc
commit
ed9590aef1
1 file changed
+4
-4
+4
-4
@@ -1309,12 +1309,12 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
|
|||||||
|
|
||||||
/* Create name:id tuple for identiy, e.g., tty:S0 */
|
/* Create name:id tuple for identiy, e.g., tty:S0 */
|
||||||
ptr = strrchr(svc->dev, '/');
|
ptr = strrchr(svc->dev, '/');
|
||||||
if (ptr) {
|
if (ptr)
|
||||||
ptr++;
|
ptr++;
|
||||||
if (!strncmp(ptr, "tty", 3))
|
else
|
||||||
ptr += 3;
|
|
||||||
} else
|
|
||||||
ptr = svc->dev;
|
ptr = svc->dev;
|
||||||
|
if (!strncmp(ptr, "tty", 3))
|
||||||
|
ptr += 3;
|
||||||
if (!id || id[0] == 0)
|
if (!id || id[0] == 0)
|
||||||
id = ptr;
|
id = ptr;
|
||||||
strlcpy(svc->name, "tty", sizeof(svc->name));
|
strlcpy(svc->name, "tty", sizeof(svc->name));
|
||||||
|
|||||||
Reference in new issue
Block a user