git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: add a async read/write variant to device ops, with allow async io to be...
[lunaix-os.git]
/
lunaix-os
/
usr
/
sh
/
sh.c
diff --git
a/lunaix-os/usr/sh/sh.c
b/lunaix-os/usr/sh/sh.c
index 0a91aa79179ebe95ef426653a2b315b4743837dd..4a924db7a9130f49f7e8ee80e645389a17054470 100644
(file)
--- a/
lunaix-os/usr/sh/sh.c
+++ b/
lunaix-os/usr/sh/sh.c
@@
-111,7
+111,7
@@
void
sh_exec(const char* name, const char** argv)
{
if (!strcmp(name, "cd")) {
sh_exec(const char* name, const char** argv)
{
if (!strcmp(name, "cd")) {
- chdir(argv[0]);
+ chdir(argv[0]
? argv[0] : "."
);
sh_printerr();
return;
}
sh_printerr();
return;
}
@@
-139,7
+139,7
@@
sh_loop()
// stdout (by default, unless user did smth) is the tty we are currently at
ioctl(stdout, TIOCSPGRP, getpgid());
// stdout (by default, unless user did smth) is the tty we are currently at
ioctl(stdout, TIOCSPGRP, getpgid());
- char* argv[] = {
0, 0
};
+ char* argv[] = {
0, 0
};
while (1) {
getcwd(pwd, 512);
while (1) {
getcwd(pwd, 512);