Merge branch 'master' of ssh://review.rcs.uwaterloo.ca:77/source/castoros

This commit is contained in:
Ali Mashtizadeh 2023-09-22 21:07:33 -04:00
commit 6441ca6707

View File

@ -17,11 +17,16 @@ main(int argc, const char *argv[])
struct stat sb; struct stat sb;
char buf[256]; char buf[256];
if (argc != 2) { if (argc < 2) {
fputs("Requires an argument\n", stdout); fputs("Requires an argument\n", stdout);
return 1; return 1;
} }
if (argc > 2) {
fputs("Too many arguments, expected one\n", stdout);
return 1;
}
status = OSStat(argv[1], &sb); status = OSStat(argv[1], &sb);
if (status != 0) { if (status != 0) {
fputs("Cannot stat file\n", stdout); fputs("Cannot stat file\n", stdout);