#include <unistd.h>
#include "busybox.h"
+int rm_main(int argc, char **argv);
int rm_main(int argc, char **argv)
{
int status = 0;
int flags = 0;
- unsigned long opt;
+ unsigned opt;
- bb_opt_complementally = "f-i:i-f";
- opt = bb_getopt_ulflags(argc, argv, "fiRr");
+ opt_complementary = "f-i:i-f";
+ opt = getopt32(argc, argv, "fiRr");
if(opt & 1)
flags |= FILEUTILS_FORCE;
if(opt & 2)
const char *base = bb_get_last_path_component(*argv);
if ((base[0] == '.') && (!base[1] || ((base[1] == '.') && !base[2]))) {
- bb_error_msg("cannot remove `.' or `..'");
+ bb_error_msg("cannot remove '.' or '..'");
} else if (remove_file(*argv, flags) >= 0) {
continue;
}