[PATCH] Add flash_lock and flash_unlock applets.

Thierry Reding thierry.reding at avionic-design.de
Fri May 22 09:13:52 UTC 2009


* Thierry Reding wrote:
> * Tito wrote:
> [...]
> > Hi,
> > please use libbb functions as shown above.
> > It seems to me that due to the fact that the applets share
> > a lot of code they could be merged into one applet and at runtime
> > you can check:
> > 
> > 	if (applet_name[6] == 'u') {
> > 		/* do flash unlock stuff */
> > 	}else {
> > 		/* do flash lock stuff */
> > 	}
> 
> Wouldn't that break bb_show_usage()? Can I alternatively put both of the
> applets' main functions into one source file and factor out shared code?

Nevermind. I've reposted a patch that combines both flash_lock and
flash_unlock in a single applet.

Thierry


More information about the busybox mailing list