svn commit: branches/busybox_scratch/coreutils
aldot at busybox.net
aldot at busybox.net
Mon Jul 3 18:51:56 UTC 2006
Author: aldot
Date: 2006-07-03 11:51:49 -0700 (Mon, 03 Jul 2006)
New Revision: 15589
Log:
- don't pull in optind since we already know about args via flags.
text data bss dec hex filename
144 0 0 144 90 coreutils/rmdir.o.oorig
139 0 0 139 8b coreutils/rmdir.o
Modified:
branches/busybox_scratch/coreutils/rmdir.c
Changeset:
Modified: branches/busybox_scratch/coreutils/rmdir.c
===================================================================
--- branches/busybox_scratch/coreutils/rmdir.c 2006-07-03 18:29:24 UTC (rev 15588)
+++ branches/busybox_scratch/coreutils/rmdir.c 2006-07-03 18:51:49 UTC (rev 15589)
@@ -4,28 +4,12 @@
*
* Copyright (C) 2003 Manuel Novoa III <mjn3 at codepoet.org>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
/* BB_AUDIT SUSv3 compliant */
/* http://www.opengroup.org/onlinepubs/007904975/utilities/rmdir.html */
-#include <stdlib.h>
-#include <unistd.h>
-#include <libgen.h>
#include "busybox.h"
int rmdir_main(int argc, char **argv)
@@ -37,7 +21,7 @@
flags = bb_getopt_ulflags(argc, argv, "p");
- argv += optind;
+ argv += flags;
if (!*argv) {
bb_show_usage();
@@ -59,7 +43,7 @@
/* Path is now just the parent component. Note that dirname
* returns "." if there are no parents. We must distinguish
* this from the case of the original path starting with '.'.
- */
+ */
if (do_dot || (*path != '.') || path[1]) {
continue;
}
More information about the busybox-cvs
mailing list