diff --git a/src/cat.c b/src/cat.c index 582ed57..a0517dd 100644 --- a/src/cat.c +++ b/src/cat.c @@ -31,7 +31,7 @@ int main(const int argc, const char **argv) { else if (!strcmp(argv[i], "-h")) { printf("cat [-n (numerate)] [file1 file2 ...]\n"); - return 1; + return 0; } } diff --git a/src/ls.c b/src/ls.c index 0a7eb4b..b1ec5c0 100644 --- a/src/ls.c +++ b/src/ls.c @@ -8,7 +8,7 @@ int list(const char *path, int flag, int label) { struct stat statbuf; if (stat(path, &statbuf)) { - fprintf(stderr, "unable to stat %s: %s\n", path, strerror(errno)); + fprintf(stderr, "ls: unable to stat %s: %s\n", path, strerror(errno)); return 1; } @@ -26,7 +26,7 @@ int list(const char *path, int flag, int label) { struct dirent *ep; DIR *dp = opendir(path); if (dp == NULL) { - fprintf(stderr, "%s: %s\n", path, strerror(errno)); + fprintf(stderr, "ls: %s: %s\n", path, strerror(errno)); return 1; }