From d8a1e77e63cb80aa8a24ad3d949f57c0ceb45477 Mon Sep 17 00:00:00 2001 From: 8nlight <8nlight@disroot.org> Date: Wed, 4 Oct 2023 20:00:21 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?src=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cat.c | 2 +- src/ls.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; }