Pádraig Brady wrote: > Jim Meyering wrote: >> Pádraig Brady <[email protected]> wrote: >> >>> I spent a little more time on this issue. >>> The attached patch makes the following changes for seekable inputs and >>> outputs. >>> Note skip is for input, and seek is for output in the following: >>> >>> skip beyond end of file >>> before: immediately exit(0); >>> after : immediately printf("cannot skip: Invalid argument); exit(0); >>> >>> skip > device size >>> before: read whole device and exit(0); >>> after : immediately printf("cannot skip: Invalid argument); exit(1); >>> seek > device size >>> before: read whole device and printf("write error: ENOSPC"); exit(1); >>> after : immediately printf("cannot seek: Invalid argument); exit(1); >>> >>> skip > max file size >>> before: read whole file and exit(0); >>> after : immediately printf("cannot skip: Invalid argument); exit(1); >>> seek > max file size >>> before: immediately printf("truncate error: EFBIG"); exit(1); >>> after : immediately printf("truncate error: EFBIG"); exit(1); >>> >>> skip > OFF_T_MAX >>> before: read whole device/file and exit(0); >>> after : immediately printf("cannot skip:"); exit(1); >>> seek > OFF_T_MAX >>> before: immediately printf("truncate error: offset too large"); exit(1); >>> after : immediately printf("truncate error: offset too large"); exit(1); >>> >>> >>> If the above is desired then I'll add tests before checking in. >> Those look like good changes. >> Thanks! > > > The proposed patch is attached. > > thanks, > Pádraig. > > > ------------------------------------------------------------------------ > > _______________________________________________ > Bug-coreutils mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/bug-coreutils
_______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
