[BusyBox] init: sysinfo [PATCH]

Jason Schoon floydpink at gmail.com
Tue Jul 5 22:17:04 UTC 2005


Given that it's difficult to determine who is or isn't using a feature, 
perhaps for now we could settle for a config option, defaulted to on, such 
as ENABLE_INIT_SWAPON. That would allow people like me to turn it off to 
save space, without breaking others.

I think this falls into the category of things that should then be changed 
in a 1.1 branch, noting the change in functionality. This would be in line 
with a post Rob had regarding 1.1 a few days ago.

On 7/5/05, Shaun Jackman <sjackman at gmail.com> wrote:
> 
> Does anyone use the check_memory/swapon feature of init? If not, I'll
> submit a patch to remove the feature and shave a few hundred bytes
> from init.
> 
> Cheers,
> Shaun
> 
> On 7/5/05, Jason Schoon <floydpink at gmail.com> wrote:
> > I would agree with addition of a config option, rather than a 
> unconditional
> > call to check_memory(). None of my embedded systems use swap, so 
> attempting
> > to swapon will be of no use.
> >
> > Granted, I really don't want to be starting the system with less than a 
> meg
> > of RAM, but swapon() wouldn't fix the problem either.
> >
> > On 7/4/05, Shaun Jackman <sjackman at gmail.com> wrote:
> > >
> > > init uses sysinfo to check if the amount of memory is less than one
> > > megabyte, and if so attempts to swapon.
> > >
> > > According to the sysinfo(2) man page...
> > > This function is Linux-specific, and should not be used in pro-
> > > grams intended to be portable.
> > >
> > > So I suggest armouring its use in an ifdef. I used ifdef
> > > _LINUX_TYPES_H, but I'd like to hear any suggestions of a better test.
> > >
> > > I find altering the behaviour of init based on the amount of installed
> > > memory a bit of a hack though. I'd rather see check_memory removed
> > > altogether. If the swapon functionality of init is useful to people,
> > > perhaps a swapon switch to init would be called for.
> > >
> > > Cheers,
> > > Shaun
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20050705/bea84581/attachment-0002.htm 


More information about the busybox mailing list