- off = strtoull(argv[2], NULL, 0);
- err = truncate64(argv[1], off);
- if (err)
- printf("Error truncating %s to %lld: %s\n", argv[1], off,
- strerror(errno));
+ rc = truncate(path, length);
+ if (rc < 0) {
+ fprintf(stderr, "%s: cannot truncate '%s' to length %lld: %s\n",
+ program_invocation_short_name, path, (long long)length,
+ strerror(errno));
+ exit(EXIT_FAILURE);
+ }