Comments on nfsmount/mount.c...
Rob Landley
rob at landley.net
Fri Sep 15 04:25:47 UTC 2006
So I'm trying to unbreak allbareconfig, and I noticed a few things about
mount.c:
1) Please put the NFS stuff at the start of the file rather than at the end.
(Right after the #include "busybox.h" would be best.) There's a convention
that the applet_main() function's always the last one inf the file, and that
convention stems from declaring stuff in an order that doesn't require
redundantly declaring a function you're about to define later in the same
file.
2) Currently, mount doesn't build without nfs:
landley at driftwood:~/busybox/busybox$ make
CC util-linux/mount.o
cc1: warnings being treated as errors
/home/landley/busybox/busybox/util-linux/mount.c:89: warning: ‘nfsmount’ used
but never defined
Alas, if (ENABLE) and #ifdef do not mix well. But the first can be far
cleaner, with a little effort.
3) Instead of having nfsmount() be a separate function, eventually it would be
nice if the body of it could go in the if() statement that's currently the
one place that calls it (the way the smbmount logic is). It needs to be
trimmed down a lot first, but that's the point of the exercise anyway. :)
I suspect you knew this. :)
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list