mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Consistently print errors to stderr
This commit is contained in:
parent
cf9145a783
commit
dcf08bd8bb
1 changed files with 4 additions and 4 deletions
|
|
@ -173,7 +173,7 @@ static void argv_parse(int argc, char **argv) {
|
|||
case 1 : exclude_add(val); break; /* --exclude */
|
||||
case 'X':
|
||||
if(exclude_addfile(val)) {
|
||||
printf("Can't open %s: %s\n", val, strerror(errno));
|
||||
fprintf(stderr, "Can't open %s: %s\n", val, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
|
@ -181,14 +181,14 @@ static void argv_parse(int argc, char **argv) {
|
|||
cachedir_tags = 1;
|
||||
break;
|
||||
case -2:
|
||||
printf("ncdu: %s.\n", val);
|
||||
fprintf(stderr, "ncdu: %s.\n", val);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if(export) {
|
||||
if(dir_export_init(export)) {
|
||||
printf("Can't open %s: %s\n", export, strerror(errno));
|
||||
fprintf(stderr, "Can't open %s: %s\n", export, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
if(strcmp(export, "-") == 0)
|
||||
|
|
@ -198,7 +198,7 @@ static void argv_parse(int argc, char **argv) {
|
|||
|
||||
if(import) {
|
||||
if(dir_import_init(import)) {
|
||||
printf("Can't open %s: %s\n", import, strerror(errno));
|
||||
fprintf(stderr, "Can't open %s: %s\n", import, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
if(strcmp(import, "-") == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue