mount -a remounts tmpfs entries: bug or feature?
Tito
farmatito at tiscali.it
Wed Dec 10 20:28:31 UTC 2008
On Wednesday 10 December 2008 20:57:41 Peter Korsgaard wrote:
> >>>>> "Jim" == Cathey, Jim <jcathey at ciena.com> writes:
>
> Hi,
>
> Jim> If anyone wants my opinion, I greatly dislike using if(FOO) with
> Jim> the expectation that the compiler will eliminate the code. I
> Jim> expect if() to be associated only with run-time decisions,
> Jim> just as #if is with compile-time decisions. In fact, if cc
> Jim> _were_ able to eliminate great gobs of code I'd even expect a
> Jim> warning to that effect, as it is likely that that is NOT what
> Jim> I as author intended.
>
> The big advantage of if (FOO) instead of #if FOO is that you always
> get to compile test all configurations (even if the code it later
> eliminated by the compiled).
>
> That's a pretty big deal as the number of configuration settings go
> up.
>
> But sure, it isn't a black/white thing.
>
Hi,
if i recall correctly we opted some time ago for if (FOO)
and the
#define SKIP_FEATURE_....
#define CONFIG_FEATURE_....
#define ENABLE_FEATURE_....
#define USE_FEATURE_....
macros
a) to enhance the readability of the code because
as was said busybox is used on a lot of different boxes
running various *nix flavours (but mostly Linux)
and if every one needs to add his own #ifdefs
soon you'll have a spaghetti code.
(BTW: I like spaghetti ;-) )
b) with if (FOO) it is not so easy to break code you don't use
and therefore it saves time and effort.
c) #ifdefs were used only in the few cases where if (FOO)
didn't work.
Just my 2 cents.
Ciao,
Tito
More information about the busybox
mailing list