- bug fix in mshell

This commit is contained in:
Marian Ohligs 2011-09-25 12:59:38 +02:00
parent 1e03b40869
commit aaf2e8a1e5

View file

@ -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);