# du doesn't_exist
du: doesn't_exist: No such file or directory
0 doesn't_exist
which was on course wrong. I simplified it a bit...
int len;
if ((lstat(filename, &statbuf)) != 0) {
- printf("du: %s: %s\n", filename, strerror(errno));
- return 0;
+ perror_msg_and_die("%s:", filename);
}
du_depth++;
return status;
}
-/* $Id: du.c,v 1.30 2000/12/09 17:07:12 andersen Exp $ */
+/* $Id: du.c,v 1.31 2000/12/11 17:08:21 andersen Exp $ */
/*
Local Variables:
c-file-style: "linux"
int len;
if ((lstat(filename, &statbuf)) != 0) {
- printf("du: %s: %s\n", filename, strerror(errno));
- return 0;
+ perror_msg_and_die("%s:", filename);
}
du_depth++;
return status;
}
-/* $Id: du.c,v 1.30 2000/12/09 17:07:12 andersen Exp $ */
+/* $Id: du.c,v 1.31 2000/12/11 17:08:21 andersen Exp $ */
/*
Local Variables:
c-file-style: "linux"