Загрузить файлы в «src»
This commit is contained in:
parent
74f22a1bd9
commit
d8a1e77e63
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
4
src/ls.c
4
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user