- bug fix in mshell
This commit is contained in:
parent
1e03b40869
commit
aaf2e8a1e5
1 changed files with 5 additions and 2 deletions
|
@ -137,8 +137,11 @@ int ms_cat(char* filename)
|
|||
|
||||
fd = open(filename, 0, "wr");
|
||||
|
||||
if ((!filename) || (fd < 0))
|
||||
printf("cat: No such file or directory");
|
||||
if (fd < 0) {
|
||||
printf("cat: No such file or directory");
|
||||
printf("\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
do {
|
||||
r = read(fd, buffer, 1024);
|
||||
|
|
Loading…
Add table
Reference in a new issue