forked from Bananymous/banan-os
Userspace: fix return values of cat and echo
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -36,5 +36,5 @@ int main(int argc, char** argv)
|
||||
fputc(' ', stdout);
|
||||
}
|
||||
printf("\n");
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user