[klibc] Releasing a klibc-1.5
H. Peter Anvin
hpa at zytor.com
Mon Feb 19 08:56:01 PST 2007
sferriol wrote:
> David Härdeman wrote:
>> H. Peter Anvin wrote:
>>> sferriol wrote:
>>>> in debian-installer, the functionalities added to klibc are:
>>>> - cpio extractor
>>>> - timeout option (-t) to read function in shell
>>>>
>>> Could you submit these as patches? I trolled the mailing list for
>>> them, but couldn't find any.
>>
>> I think what you are looking for is found in
>> http://ftp.debian.org/debian/pool/main/r/rootskel/rootskel_1.49.tar.gz
>>
>> the files are:
>> rootskel-1.49/src-bootfloppy/bin/cpio.c
>> rootskel-1.49/src-bootfloppy/bin/timeout_read.c
> do not use timeout_read, it just detects a key pressed during a lapse of
> time. I think the best is to add -t option in dash read function, see
> patch attached
>
> if ((ifs = bltinlookup("IFS")) == NULL)
> ifs = defifs;
> + if (ts.tv_sec || ts.tv_usec) {
> + FD_ZERO (&set);
> + FD_SET (0, &set);
> +
> + i = select (FD_SETSIZE, &set, NULL, NULL, &ts);
> + if (!i) {
> + return 1;
> + }
> + }
> status = 0;
What is it you really want done here? That the read fails unless it is
*complete* before the timeout? If so, the above is wrong; it will reset
the timeout on every character (or worse, the first character only...
I'm not 100% sure since haven't looked at the code in detail.)
-hpa
More information about the klibc
mailing list