mirror of
https://github.com/troglobit/finit.git
synced 2026-10-12 10:12:32 +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:
+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 */
|
||||
ptr = strrchr(svc->dev, '/');
|
||||
if (ptr) {
|
||||
if (ptr)
|
||||
ptr++;
|
||||
if (!strncmp(ptr, "tty", 3))
|
||||
ptr += 3;
|
||||
} else
|
||||
else
|
||||
ptr = svc->dev;
|
||||
if (!strncmp(ptr, "tty", 3))
|
||||
ptr += 3;
|
||||
if (!id || id[0] == 0)
|
||||
id = ptr;
|
||||
strlcpy(svc->name, "tty", sizeof(svc->name));
|
||||
|
||||
Reference in New Issue
Block a user