Fix parse error for detecting external getty

When an external getty is used, and an absolute path is not given, the
parser tried to use access() to determine built-in vs external getty.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-05-27 11:18:06 +02:00
parent e867e039bb
commit 1351b708fe
+1 -1
View File
@@ -161,7 +161,7 @@ int tty_parse_args(char *cmd, struct tty *tty)
tty->notty = 1; /* for board bringup */
else if (!strcmp(cmd, "rescue"))
tty->rescue = 1; /* for rescue shells */
else if (!access(cmd, X_OK))
else if (whichp(cmd)) /* in $PATH? */
tty->cmd = cmd;
else
tty->args[tty->num++] = cmd;