Misc. cleanup

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-04-14 23:41:02 +02:00
parent c0368d2b16
commit 0929c93caf
3 changed files with 5 additions and 11 deletions
+1 -1
View File
@@ -405,7 +405,7 @@ pid_t run_getty2(char *tty, char *cmd, char *args[], int noclear, int nowait, st
/* Dunno speed, tell stty() to not mess with it */
prepare_tty(tty, B0, "getty", rlimit);
if (activate_console(noclear, nowait)) {
logit(LOG_INFO, "Starting external getty on %s, speed %u", tty, B0);
logit(LOG_INFO, "Starting external getty on %s", tty);
rc = execv(cmd, args);
}
+3 -9
View File
@@ -962,7 +962,7 @@ static void parse_cmdline_args(svc_t *svc, char *cmd)
* Copy supplied args. Stop at MAX_NUM_SVC_ARGS-1 to allow the args
* array to be zero-terminated.
*/
for (i = 1; (arg = strtok(NULL, " ")) && i < (MAX_NUM_SVC_ARGS - 1);) {
while ((arg = strtok(NULL, " ")) && i < (MAX_NUM_SVC_ARGS - 1)) {
char prev[sizeof(svc->args[0])] = { 0 };
char ch = arg[0];
size_t len;
@@ -1005,13 +1005,6 @@ static void parse_cmdline_args(svc_t *svc, char *cmd)
diff++;
}
}
#if 0
for (i = 0; i < MAX_NUM_SVC_ARGS; i++) {
if (!svc->args[i][0])
break;
_d("%s ", svc->args[i]);
}
#endif
if (diff)
_d("Modified args for %s detected", cmd);
@@ -1417,7 +1410,8 @@ static void service_retry(svc_t *svc)
if (svc->state != SVC_HALTED_STATE ||
svc->block != SVC_BLOCK_RESTARTING) {
_d("%s not crashing anymore", svc->cmd);
if (!svc_is_tty(svc))
_d("%s not crashing anymore", svc->cmd);
*restart_cnt = 0;
return;
}
+1 -1
View File
@@ -191,7 +191,7 @@ int tty_parse_args(char *cmd, struct tty *tty)
}
_d("Registering %s getty on TTY %s at %s baud with term %s", tty->cmd ? "external" : "built-in",
tty->dev, tty->baud ?: "NULL", tty->term ?: "N/A");
tty->dev, tty->baud ?: "0", tty->term ?: "N/A");
return 0;
}