*
* Original copyright notice is retained at the end of this file.
*
- * Modified for BusyBox by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
+ * Modified for BusyBox by Erik Andersen <andersen@codepoet.org>
*/
/* BB_AUDIT SUSv3 compliant */
{
char **ep, *p;
char *cleanenv[1] = { NULL };
- int ch;
+ unsigned long opt;
- while ((ch = getopt(argc, argv, "iu:")) > 0) {
- switch(ch) {
- case 'i':
+ opt = bb_getopt_ulflags(argc, argv, "iu:", &p);
+ if(opt & 1)
environ = cleanenv;
- break;
- case 'u':
- unsetenv(optarg);
- break;
- default:
- bb_show_usage();
- }
- }
+ if(opt & 2)
+ unsetenv(p);
argv += optind;