From 16abcd90aefae8bdb9f7d80a555982dba6ca59b5 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 13 Apr 2007 23:59:52 +0000 Subject: teach find_root_device to deal with /dev/ subdirs (by "Kirill K. Smirnov" ) --- coreutils/rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coreutils/rm.c') diff --git a/coreutils/rm.c b/coreutils/rm.c index 61e3e7010..e29073db8 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c @@ -40,7 +40,7 @@ int rm_main(int argc, char **argv) do { const char *base = bb_get_last_path_component(*argv); - if ((base[0] == '.') && (!base[1] || ((base[1] == '.') && !base[2]))) { + if (DOT_OR_DOTDOT(base)) { bb_error_msg("cannot remove '.' or '..'"); } else if (remove_file(*argv, flags) >= 0) { continue; -- cgit v1.2.3