Messages in this thread | | | From | "H. Peter Anvin" <> | Subject | Re: klibc and logging | Date | 13 Aug 2002 11:05:37 -0700 |
| |
Followup to: <Pine.GSO.4.21.0208130626481.1689-100000@weyl.math.psu.edu> By author: Alexander Viro <viro@math.psu.edu> In newsgroup: linux.dev.kernel > > 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. >
FWIW, the attached program compiles fine against klibc:
: tazenda 36 ; ls -l tests/nfs_no_rpc.stripped -rwxrwxr-x 1 hpa eng 11124 Aug 13 10:57 tests/nfs_no_rpc.stripped*
I have checked it in to the tests/ directory of klibc with a few minor warnings cleanups, but without messing around with things like adding command-line parsing (which would be trivial; use getopt()).
-hpa -- <hpa@transmeta.com> at work, <hpa@zytor.com> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com> - 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/
| |