Re: klibc and logging

From: Eric W. Biederman (ebiederm@xmission.com)
Date: Tue Aug 13 2002 - 09:27:12 EST


Alexander Viro <viro@math.psu.edu> writes:

> On Tue, 13 Aug 2002, Erik Andersen wrote:
>
> > I would love to see an example of how to do an NFS mount w/o
> > resorting to the C library at all. Plainly, having generic RPC
> > code in the C library sucks, even if you trim it down. Having
> > the entire NFS mount process live in application space, and not
> > in the C library, is clearly a win....
>
> See below - it's crud, but it works. Based of fs/nfs/nfsroot.c, moved
> to userland with RPC done via syscalls and nothing else. Arguments are
> passed via environment variables, replacing that with use of argv is
> trivial... Other than syscalls uses: alarm(3), getenv(3), str... and
> mem..., {s,}printf(3), htonl(3) and htons(3). About 4Kb of .text + .data
> and aforementioned functions shouldn't add much to that.
>
> Hardly usable as generic-purpose mount_nfs(8), but for nfsroot... I'd
> prefer to have timeouts handled properly and code - cleaned up, but
> other than that it should be usable.

It might be worth looking at etherboot (www.etherboot.org). It isn't
exactly userspace but it also has a minimal nfs client that can mount
an nfs filesystem and read a file, and timeouts are handled. If
nothing else it should generate some ideas.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:32 EST