easy way to determine if a stream or fd is seekable

Tim Kientzle tim at kientzle.com
Sun Nov 20 04:48:50 UTC 2011


On Nov 18, 2011, at 2:10 PM, Juergen Lock wrote:

> On Fri, Nov 18, 2011 at 12:00:07PM -0800, Tim Kientzle wrote:
>> 
>> On Nov 17, 2011, at 12:55 PM, Juergen Lock wrote:
>> 
>>>> 
>>>> After a few experiments, bsdtar stopped using lseek() on
>>>> FreeBSD for anything other than regular files and block
>>>> devices.
>>> 
>>> Ah is that the reason why my patch never made it into FreeBSD 9?
>>> ….
>>> Cheers,
>>> 	Juergen (who would still like to see a faster "tar tfv /dev/cd0"... :)
>> 
>> I would like to see that as well.
>> 
>> Take a look at 
>> 
>> http://libarchive.googlecode.com/svn/trunk/libarchive/archive_read_open_filename.c
>> 
> 
> Ah so it's `just' a slow release cycle?
> 
> % grep DIOCGMEDIASIZE /home/ncvs/src/lib/libarchive/archive_read_open_filename.c,v 
> %
> 
> When will we see this code in FreeBSD?  10.0?  9.1?  8.3? :)

Definitely in FreeBSD 10.

Unfortunately libarchive 3.0 breaks the API and ABI, so it can't
be imported into 9.1 or 8.3 wholesale.  It should
be possible to back port select pieces, though.

Tim



More information about the freebsd-hackers mailing list