summaryrefslogtreecommitdiff
path: root/usr.sbin/init
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/init')
-rw-r--r--usr.sbin/init/mshell.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/init/mshell.c b/usr.sbin/init/mshell.c
index 78c3a82..dde07a9 100644
--- a/usr.sbin/init/mshell.c
+++ b/usr.sbin/init/mshell.c
@@ -77,6 +77,10 @@ parse_input(struct mshell_state *state)
cmd[cmd_idx] = '\0';
+ /* Ignore empty commands */
+ if (cmd_idx == 0)
+ return;
+
if (strcmp(cmd, "reboot") == 0) {
reboot(REBOOT_DEFAULT);
} else if (strcmp(cmd, "pagesize") == 0) {