Subject: Re: [need review] pax(1) fast list/extract on raw disk device
To: None <tech-userlevel@netbsd.org, tech-kern@netbsd.org>
From: ITOH Yasufumi <itohy@netbsd.org>
List: tech-kern
Date: 02/10/2000 14:34:13
abs@netbsd.org wrote:

> 	Do you need to check for sockets as well as pipes?
> 	Does it make more sense to have the lseek() case automatically
> 	fall back to read(), just in case?

The comment in ar_io.c::ar_fow() (the function should be named "ar_forw" :-)
says lseek()ing tape (artyp == ISTAPE) is unsafe.

"artyp == ISPIPE" is set when the lseek() in ar_io.c::ar_open() was failed
and we cannot expect another lseek() succeeds.

On other cases pax tries lseek(), and falls back to read() unless the
archive is a reguar file.

Seems OK?  Opinions?
-- 
ITOH, Yasufumi