In message <[EMAIL PROTECTED]>, Matthew Dillon wri
tes:
>    Woa!  That sounds like a bad idea to me.  If you want to do it right
>    then open(), fstat(), and only if the stat says it is a regular file
>    do you then ftruncate().  Passing O_TRUNC to a tape device may be ignored
>    by us, but it's not a valid flag to pass to a tape device and we shouldn't
>    do it.

Yeah, I guess checking the file type first makes more sense. I tend
to use shell `>' redirects a lot when accessing tape devices. They
unconditionally add O_TRUNC, so I know I'd be very surprised if
there were side-effects! However for dump I agree that it's best
not to make such assumptions.

Ian

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to