if (argc < 1)
usage(stderr);
if (stat(argv[0], &st) < 0)
- err(EXIT_FAILURE, _("stat failed %s"), argv[0]);
+ err(EXIT_FAILURE, _("stat of %s failed"), argv[0]);
if (!S_ISBLK(st.st_mode))
/* do not test major - perhaps this was an USB floppy */
errx(EXIT_FAILURE, _("%s: not a block device"), argv[0]);
/* find the physical size of the file or block device */
if (stat(filename, &st) < 0)
- err(FSCK_EX_ERROR, _("stat failed %s"), filename);
+ err(FSCK_EX_ERROR, _("stat of %s failed"), filename);
fd = open(filename, O_RDONLY);
if (fd < 0)
device = argv[optind++];
if (stat(device, &statbuf) < 0)
- err(EXIT_FAILURE, _("stat failed %s"), device);
+ err(EXIT_FAILURE, _("stat of %s failed"), device);
if (!S_ISBLK(statbuf.st_mode))
errx(EXIT_FAILURE, _("%s is not a block special device"), device);
memcpy(endpath, dirent->d_name, namelen + 1);
if (lstat(path, &st) < 0) {
- warn(_("stat failed %s"), endpath);
+ warn(_("stat of %s failed"), endpath);
warn_skip = 1;
continue;
}
case 'i':
opt_image = optarg;
if (lstat(opt_image, &st) < 0)
- err(MKFS_EX_USAGE, _("stat failed %s"), opt_image);
+ err(MKFS_EX_USAGE, _("stat of %s failed"), opt_image);
image_length = st.st_size; /* may be padded later */
fslen_ub += (image_length + 3); /* 3 is for padding */
break;
blksize = getpagesize();
if (stat(dirname, &st) < 0)
- err(MKFS_EX_USAGE, _("stat failed %s"), dirname);
+ err(MKFS_EX_USAGE, _("stat of %s failed"), dirname);
fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd < 0)
err(MKFS_EX_USAGE, _("cannot open %s"), outfile);
strcpy(tmp+2, ".badblocks");
}
if (stat(device_name, &statbuf) < 0)
- err(MKFS_EX_ERROR, _("stat failed %s"), device_name);
+ err(MKFS_EX_ERROR, _("stat of %s failed"), device_name);
if (S_ISBLK(statbuf.st_mode))
DEV = open(device_name,O_RDWR | O_EXCL);
else
assert(ctl->devname);
if (stat(ctl->devname, &ctl->devstat) < 0)
- err(EXIT_FAILURE, _("stat failed %s"), ctl->devname);
+ err(EXIT_FAILURE, _("stat of %s failed"), ctl->devname);
if (S_ISBLK(ctl->devstat.st_mode))
ctl->fd = open(ctl->devname, O_RDWR | O_EXCL);
device = argv[optind];
if (stat(device, &sb))
- err(EXIT_FAILURE, _("stat failed %s"), device);
+ err(EXIT_FAILURE, _("stat of %s failed"), device);
part_devno = sb.st_rdev;
begintime = ut.UL_UT_TIME;
else {
if (fstat(fileno(fp), &st) != 0)
- err(EXIT_FAILURE, _("stat failed %s"), ctl->altv[ctl->alti]);
+ err(EXIT_FAILURE, _("stat of %s failed"), ctl->altv[ctl->alti]);
begintime = st.st_ctime;
quit = 1;
}
err(EXIT_FAILURE, _("cannot open %s"), filename);
if (fstat(fileno(in), &st) == -1)
- err(EXIT_FAILURE, _("%s: stat failed"), filename);
+ err(EXIT_FAILURE, _("stat of %s failed"), filename);
if (st.st_size == *size)
goto done;
memcpy(path + len, DOTDOTDIR, sizeof(DOTDOTDIR));
if (stat(path, st))
- err(EXIT_FAILURE, _("stat failed %s"), path);
+ err(EXIT_FAILURE, _("stat of %s failed"), path);
free(path);
return st;
}
struct stat sb;
if (lstat(s, &sb) == -1) {
- warn(_("%s: lstat failed"), s);
+ warn(_("stat of %s failed"), s);
return 2;
}
if (!S_ISLNK(sb.st_mode)) {
err(EXIT_FAILURE, _("cannot open %s"), path);
if (fstat(fd, &sb) == -1)
- err(EXIT_FAILURE, _("stat failed %s"), path);
+ err(EXIT_FAILURE, _("stat of %s failed"), path);
if (!S_ISBLK(sb.st_mode))
errx(EXIT_FAILURE, _("%s: not a block device"), path);
if (fd < 0)
err(EXIT_FAILURE, _("cannot open %s"), ctl->filename);
if (fstat(fd, &st))
- err(EXIT_FAILURE, _("stat failed %s"), ctl->filename);
+ err(EXIT_FAILURE, _("stat of %s failed"), ctl->filename);
*buf = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
if (*buf == MAP_FAILED)
#endif
if (fstat(fd, &st) != 0)
- err(EXIT_FAILURE, _("stat failed %s"), filename);
+ err(EXIT_FAILURE, _("stat of %s failed"), filename);
bufsz = st.st_blksize;
err(EXIT_FAILURE, _("cannot open %s"), path);
if (fstat(fd, &sb) == -1) {
- warn(_("stat failed %s"), path);
+ warn(_("stat of %s failed"), path);
goto done;
}
return -1;
}
if (fstat(fd, &sb) == -1) {
- warn(_("stat failed %s"), path);
+ warn(_("stat of %s failed"), path);
return -1;
}
if (!S_ISDIR(sb.st_mode)) {
int permMask;
if (stat(special, &st) < 0) {
- warn(_("stat failed %s"), special);
+ warn(_("stat of %s failed"), special);
goto err;
}
struct stat sb;
if (fstatat(dfd, d->d_name, &sb, AT_SYMLINK_NOFOLLOW)) {
- warn(_("stat failed %s"), d->d_name);
+ warn(_("stat of %s failed"), d->d_name);
continue;
}
struct stat newroot_stat, sb;
if (stat(newroot, &newroot_stat) != 0) {
- warn(_("stat failed %s"), newroot);
+ warn(_("stat of %s failed"), newroot);
return -1;
}
err(MESG_EXIT_FAILURE, _("ttyname failed"));
if (stat(tty, &sb) < 0)
- err(MESG_EXIT_FAILURE, _("stat failed %s"), tty);
+ err(MESG_EXIT_FAILURE, _("stat of %s failed"), tty);
if (!*argv) {
if (sb.st_mode & (S_IWGRP | S_IWOTH)) {
fflush(stdout);
if (clreol)
cleareol();
- warn(_("stat failed %s"), fs);
+ warn(_("stat of %s failed"), fs);
return ((FILE *)NULL);
}
if ((stbuf.st_mode & S_IFMT) == S_IFDIR) {
err(EXIT_FAILURE, _("cannot open %s"), filename);
if (fstat(fd, &st) == -1)
- err(EXIT_FAILURE, _("stat failed %s"), filename);
+ err(EXIT_FAILURE, _("stat of %s failed"), filename);
if (st.st_size == *size) {
close(fd);
filename = argv[optind];
if (stat(filename, &st) != 0)
- err(EXIT_FAILURE, _("stat failed %s"), filename);
+ err(EXIT_FAILURE, _("stat of %s failed"), filename);
size = st.st_size;;
tailf(filename, lines);