Subject: Re: CVS commit: syssrc
To: Jason R Thorpe <thorpej@netbsd.org>
From: Konrad Schroder <perseant@hhhh.org>
List: source-changes
Date: 07/13/2000 17:27:32
On Thu, 13 Jul 2000, Jason R Thorpe wrote:

> Log Message:
> XXX Use of hzto() return value needs to be double-checked here.

Passing zero to wait forever is fine, the cleaner only needs to wake up
when lfs_avail goes too low or a new segment is acquired for writing, or
the fs is unmounted.

But I definitely don't understand what the point is of adding "time"
into the value (though it's been that way since 4.4Lite)...do I
misunderstand something, or should it just be

        if (SCARG(uap, tv)) { 
                error = copyin(SCARG(uap, tv), &atv, sizeof(struct timeval));
                if (error)
                        return (error);
                if (itimerfix(&atv))  
                        return (EINVAL);
                timeout = hzto(&atv);
        } else
                timeout = 0;
   
        error = tsleep(addr, PCATCH | PUSER, "segment", timeout);

?
						Konrad Schroder
						perseant@hhhh.org