}
if (res == -1) {
- perror(bdcms[j].iocname);
+ warn(_("ioctl error on %s"), bdcms[j].iocname);
if (verbose)
printf(_("%s failed.\n"), _(bdcms[j].help));
exit(EXIT_FAILURE);
/* Execute the program */
execvp(progname, argv + optind);
- perror(progname);
- return EXIT_FAILURE;
+ err(EXIT_FAILURE, _("failed to execute %s"), progname);
}
memcpy(endpath, dirent->d_name, namelen + 1);
if (lstat(path, &st) < 0) {
- perror(endpath);
+ warn(_("stat failed %s"), endpath);
warn_skip = 1;
continue;
}
fflush(stdout);
if (clreol)
cleareol();
- perror(fs);
+ warn(_("stat failed %s"), fs);
return ((FILE *)NULL);
}
if ((stbuf.st_mode & S_IFMT) == S_IFDIR) {
}
if ((f = Fopen(fs, "r")) == NULL) {
fflush(stdout);
- perror(fs);
+ warn(_("cannot open %s"), fs);
return ((FILE *)NULL);
}
if (magic(f, fs)) {
int tgrp;
/* Wait until we're in the foreground before we
* save the terminal modes. */
- if ((tgrp = tcgetpgrp(fileno(stdout))) < 0) {
- perror("tcgetpgrp");
- exit(EXIT_FAILURE);
- }
+ if ((tgrp = tcgetpgrp(fileno(stdout))) < 0)
+ err(EXIT_FAILURE, "tcgetpgrp");
if (tgrp != getpgrp(0)) {
kill(0, SIGTTOU);
goto retry;