Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Dec 2001 20:43:31 +0000
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Bernd Walter <ticso@cicely8.cicely.de>, cjclark@alum.mit.edu, Mark Hannon <markhannon@optushome.com.au>, hackers@FreeBSD.ORG
Subject:   Re: bin/32261: dump creates a dump file much larger than sum of dumped files 
Message-ID:   <200112042043.aa94374@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Tue, 04 Dec 2001 11:57:01 PST." <200112041957.fB4Jv1j20226@apollo.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200112041957.fB4Jv1j20226@apollo.backplane.com>, 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <200112042043.aa94374>