static void
usage(void)
{
- fprintf(stderr, "%s: [-npv] <size> <name1> [<name2>] ...\n", progname);
+ fprintf(stderr, _("%s: [-npv] <size> <name1> [<name2>] ...\n"),
+ progname);
exit(2);
}
fstatfs(fd, &buf);
if (statfstype(&buf) != XFS_SUPER_MAGIC) {
- fprintf(stderr, "%s: "
- "file [\"%s\"] is not on an XFS filesystem\n",
+ fprintf(stderr, _("%s: "
+ "file [\"%s\"] is not on an XFS filesystem\n"),
progname, name);
return -1;
}
xfs_flock64_t flck;
progname = basename(argv[0]);
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
while ((c = getopt(argc, argv, "npvV")) != EOF) {
switch(c) {
case 'n':
verbose++;
break;
case 'V':
- printf("%s version %s\n", progname, VERSION);
+ printf(_("%s version %s\n"), progname, VERSION);
exit(0);
default:
errflg++;
mult *= 1024;
break;
default:
- fprintf(stderr, "unknown size %s\n", argv[optind]);
+ fprintf(stderr, _("unknown size %s\n"), argv[optind]);
usage();
}
while (optind < argc) {
if (verbose)
- fprintf(stdout, "%s %lld bytes %s\n",
+ fprintf(stdout, _("%s %lld bytes %s\n"),
argv[optind], (long long)size,
prealloc
- ? "(pre-allocated)"
+ ? _("(pre-allocated)")
: "");
oflags = O_CREAT|O_TRUNC|O_WRONLY|(nobytes ? 0 : O_DIRECT);
}
if ((result = lseek64(fd, size - 1, SEEK_SET)) < 0LL) {
- /*
- * This check doesn't actually work for 6.2
- * efs and nfs2, although it should.
- */
- fprintf(stderr, "lseek64 error, result = %lld\n",
+ fprintf(stderr, _("lseek64 error, result = %lld\n"),
(long long)result);
if (errno)
perror(argv[optind]);
flck.l_start = 0LL;
flck.l_len = size;
if (prealloc)
- (void)ioctl(fd, XFS_IOC_RESVSP64, &flck);
+ ioctl(fd, XFS_IOC_RESVSP64, &flck);
if (oflags & O_DIRECT) {
nbufalign = da.d_mem;