mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
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:
1 parent
e867e039bb
commit
1351b708fe
1 file changed
+1
-1
@@ -161,7 +161,7 @@ int tty_parse_args(char *cmd, struct tty *tty)
|
|||||||
tty->notty = 1; /* for board bringup */
|
tty->notty = 1; /* for board bringup */
|
||||||
else if (!strcmp(cmd, "rescue"))
|
else if (!strcmp(cmd, "rescue"))
|
||||||
tty->rescue = 1; /* for rescue shells */
|
tty->rescue = 1; /* for rescue shells */
|
||||||
else if (!access(cmd, X_OK))
|
else if (whichp(cmd)) /* in $PATH? */
|
||||||
tty->cmd = cmd;
|
tty->cmd = cmd;
|
||||||
else
|
else
|
||||||
tty->args[tty->num++] = cmd;
|
tty->args[tty->num++] = cmd;
|
||||||
|
|||||||
Reference in new issue
Block a user