ftruncate(2) for System V.3.2 needed

Guy Harris guy at auspex.auspex.com
Tue Jul 18 03:55:50 AEST 1989


>This ioctl() call looks like something that would be interesting to
>try, however, the value of F_FREESP is not to be found in *ANY* of the
>includes on my site - could someome perhaps indicate what numerical
>value F_FREESP is supposed to be on USG type systems?

The value that's defined in <fcntl.h>.  If it's not defined there, your
system may not *have* such an "fcntl()" call (not "ioctl()") - it first
appeared in some flavor of S5R3.1, isn't in S5R3 (or S5R2 or earlier),
and in S5R3.1 the code that implements it has the comments:

/*
 * This is an experimental facility for SVR3.1 and WILL be changed
 * in the next release.  ...
 *

	...

 * Bug:  unused bytes in the last retained block are not cleared.
 * This may result in a "hole" in the file that does not read as zeroes.
 */

so beware - if it's not documented, it may be because it's not
considered "done" and may not be supported or even work correctly in all
cases....



More information about the Comp.unix.wizards mailing list