On 1/28/18 2:31 PM, Seymour J Metz wrote:
"fstat() the image file to get its size"
What if it isn't an image file, or any other kind of DASD file. Unix has other
kinds of files for which there is no way to know the size a priori.
Pedantically speaking, you're correct. However, I don't lose any sleep
over that fact. The code I mentioned is encapsulated in a subroutine
that's not visible outside of the application. Higher level callers to
this routine make sure that the item is capable of being fstat()'d.