Subject: Re: TFTP'ing RAMdisk at root mount time (updated patch)
To: matthew green <mrg@eterna.com.au>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: tech-kern
Date: 05/05/2007 22:51:20
matthew green <mrg@eterna.com.au> wrote:
> it seems to me that this is duplicating a lot of what is in libsa.
> infact, the patch has at least comment to that effect. i wonder if
> there is a better way to share this..
I attempted to reuse libsa code from within the kernel, but obviously it
was not written for that purpose: just tryling to include a .c will
produce a bunch of dupliacate declarations.
> it seems that you call realloc() for ever incoming packet? that
> seems suboptimal.
What else could I do? I don't know the file size in advance. Of course I
could realloc a buffer twice as big so that I have to realloc less
often, but as I understand, realloc() already do this kind of
optimisations, and trying to reproduce them may be counterproductive.
> i believe nfs_boot.c will fail to compile (unused "out:" label)
> when TFTPROOT is not defined.
Right, that is easy to fix.
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@netbsd.org