diff options
author | John Crispin <blogic@openwrt.org> | 2014-10-12 14:54:29 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-10-12 15:01:47 +0200 |
commit | b9a389c841db8433bb3b02158b1512cf577dbff7 (patch) | |
tree | f9e3b37b5900c319826bf6374efa0d3653291cce /inittab.c | |
parent | e63051d9843ddbafb1fabfd97d60e853bdeac129 (diff) | |
download | unitd-b9a389c841db8433bb3b02158b1512cf577dbff7.tar unitd-b9a389c841db8433bb3b02158b1512cf577dbff7.zip |
minor fixes to michels patches
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'inittab.c')
-rw-r--r-- | inittab.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -85,7 +85,7 @@ static int dev_exist(const char *dev) if (res != -1) { close(res); } - + return (res != -1); } @@ -172,10 +172,10 @@ static void askconsole(struct init_action *a) int i; tty = get_cmdline_val("console", line, sizeof(line)); - split=strchr(tty, ','); - if (split != NULL) - split = '\0'; - + split = strchr(tty, ','); + if (split) + *split = '\0'; + if (!dev_exist(tty)) { DEBUG(4, "skipping %s\n", tty); return; |