if (argc < 1)
usage(stderr);
if (stat(argv[0], &st) < 0)
- err(EXIT_FAILURE, _("cannot stat file %s"), argv[0]);
+ err(EXIT_FAILURE, _("stat failed %s"), 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 failed %s"), filename);
fd = open(filename, O_RDONLY);
if (fd < 0)
device = argv[optind++];
if (stat(device, &statbuf) < 0)
- err(EXIT_FAILURE, _("cannot stat device %s"), device);
+ err(EXIT_FAILURE, _("stat failed %s"), device);
if (!S_ISBLK(statbuf.st_mode))
errx(EXIT_FAILURE, _("%s is not a block special device"), device);
case 'i':
opt_image = optarg;
if (lstat(opt_image, &st) < 0)
- err(MKFS_EX_USAGE, _("cannot stat %s"), opt_image);
+ err(MKFS_EX_USAGE, _("stat failed %s"), opt_image);
image_length = st.st_size; /* may be padded later */
fslen_ub += (image_length + 3); /* 3 is for padding */
break;
outfile = argv[optind + 1];
if (stat(dirname, &st) < 0)
- err(MKFS_EX_USAGE, _("cannot stat %s"), dirname);
+ err(MKFS_EX_USAGE, _("stat failed %s"), 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, _("%s: stat failed"), device_name);
+ err(MKFS_EX_ERROR, _("stat failed %s"), device_name);
if (S_ISBLK(statbuf.st_mode))
DEV = open(device_name,O_RDWR | O_EXCL);
else
device = argv[optind];
if (stat(device, &sb))
- err(EXIT_FAILURE, _("%s: stat failed"), device);
+ err(EXIT_FAILURE, _("stat failed %s"), device);
part_devno = sb.st_rdev;
memcpy(path + len, DOTDOTDIR, sizeof(DOTDOTDIR));
if (stat(path, st))
- err(EXIT_FAILURE, _("could not stat '%s'"), path);
+ err(EXIT_FAILURE, _("stat failed %s"), path);
free(path);
return st;
}
if (fd < 0)
err(EXIT_FAILURE, _("cannot open: %s"), filename);
if (fstat(fd, &st))
- err(EXIT_FAILURE, _("cannot stat: %s"), filename);
+ err(EXIT_FAILURE, _("stat failed %s"), filename);
*buf = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0);
if (*buf == MAP_FAILED)
err(EXIT_FAILURE, _("%s: open failed"), path);
if (fstat(fd, &sb) == -1) {
- warn(_("%s: fstat failed"), path);
+ warn(_("stat failed %s"), path);
goto done;
}
}
if (stat(path, &sb) == -1)
- err(EXIT_FAILURE, _("%s: stat failed"), path);
+ err(EXIT_FAILURE, _("stat failed %s"), path);
if (!S_ISDIR(sb.st_mode))
errx(EXIT_FAILURE, _("%s: not a directory"), path);
unsigned long long devsize = 0;
if (stat(special, &st) < 0) {
- warn(_("%s: stat failed"), special);
+ warn(_("stat failed %s"), special);
goto err;
}
dfd = dirfd(dir);
if (fstat(dfd, &rb)) {
- warn(_("failed to stat directory"));
+ warn(_("stat failed"));
goto done;
}
struct stat sb;
if (fstatat(dfd, d->d_name, &sb, AT_SYMLINK_NOFOLLOW)) {
- warn(_("failed to stat %s"), d->d_name);
+ warn(_("stat failed %s"), d->d_name);
continue;
}
struct stat newroot_stat, sb;
if (stat(newroot, &newroot_stat) != 0) {
- warn(_("failed to stat directory %s"), newroot);
+ warn(_("stat failed %s"), newroot);
return -1;
}
err(MESG_EXIT_FAILURE, _("ttyname failed"));
if (stat(tty, &sb) < 0)
- err(MESG_EXIT_FAILURE, _("stat %s failed"), tty);
+ err(MESG_EXIT_FAILURE, _("stat failed %s"), tty);
if (!*argv) {
if (sb.st_mode & (S_IWGRP | S_IWOTH)) {
rewind(fp);
if (fstat(fileno(fp), &sbuf))
- err(EXIT_FAILURE, _("fstat failed"));
+ err(EXIT_FAILURE, _("stat failed"));
*mbufsize = (size_t) sbuf.st_size;
mbuf = xmalloc(*mbufsize);
err(EXIT_FAILURE, _("cannot open \"%s\" for read"), filename);
if (fstat(fd, &st) == -1)
- err(EXIT_FAILURE, _("cannot stat \"%s\""), filename);
+ err(EXIT_FAILURE, _("stat failed %s"), filename);
if (st.st_size == *size) {
close(fd);
filename = argv[optind];
if (stat(filename, &st) != 0)
- err(EXIT_FAILURE, _("cannot stat \"%s\""), filename);
+ err(EXIT_FAILURE, _("stat failed %s"), filename);
size = st.st_size;;
tailf(filename, lines);