f = open(fn, 0);
if (f < 0)
{
- fprintf(stderr, _("%s: could not open file \"%s\": %m\n"), progname, fn);
+ fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
+ progname, fn, strerror(errno));
exit(1);
}
dir = opendir(path);
if (!dir)
{
- fprintf(stderr, _("%s: could not open directory \"%s\": %m\n"),
- progname, path);
+ fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
+ progname, path, strerror(errno));
exit(1);
}
while ((de = readdir(dir)) != NULL)
snprintf(fn, sizeof(fn), "%s/%s", path, de->d_name);
if (lstat(fn, &st) < 0)
{
- fprintf(stderr, _("%s: could not stat file \"%s\": %m\n"),
- progname, fn);
+ fprintf(stderr, _("%s: could not stat file \"%s\": %s\n"),
+ progname, fn, strerror(errno));
exit(1);
}
if (S_ISREG(st.st_mode))