Userspace: fix return values of cat and echo

This commit is contained in:
Bananymous 2023-06-10 17:34:10 +03:00
parent 4cdeb98897
commit 223d2ac3a6
2 changed files with 4 additions and 3 deletions

View File

@ -32,14 +32,15 @@ int main(int argc, char** argv)
ret = 1;
continue;
}
if (cat_file(fp))
if (!cat_file(fp))
ret = 1;
fclose(fp);
}
}
else
{
ret = cat_file(stdin);
if (!cat_file(stdin))
ret = 1;
}
return ret;

View File

@ -36,5 +36,5 @@ int main(int argc, char** argv)
fputc(' ', stdout);
}
printf("\n");
return 1;
return 0;
}