From: Eric Blake Date: Thu, 16 Sep 2010 17:52:27 +0000 (-0600) Subject: rm: remove no-op -d option X-Git-Tag: v8.6~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95732b834e5dead84fefa7b6d387f61048ed21b3;p=thirdparty%2Fcoreutils.git rm: remove no-op -d option * src/rm.c (long_opts, main): Resolve a fixme. * NEWS: Document the change. Based on a report by William Plusnick. --- diff --git a/NEWS b/NEWS index 3eb28b1e3b..4f1b2b01ac 100644 --- a/NEWS +++ b/NEWS @@ -48,6 +48,8 @@ GNU coreutils NEWS -*- outline -*- [The old behavior was introduced in coreutils-6.0 and had been removed for English only using a different method since coreutils-8.1] + rm's -d now evokes an error; before, it was silently ignored. + sort -g now uses long doubles for greater range and precision. sort -h no longer rejects numbers with leading or trailing ".", and diff --git a/src/rm.c b/src/rm.c index 42f0a57953..3b78e1909f 100644 --- a/src/rm.c +++ b/src/rm.c @@ -63,7 +63,6 @@ enum interactive_type static struct option const long_opts[] = { - {"directory", no_argument, NULL, 'd'}, {"force", no_argument, NULL, 'f'}, {"interactive", optional_argument, NULL, INTERACTIVE_OPTION}, @@ -222,17 +221,10 @@ main (int argc, char **argv) /* Try to disable the ability to unlink a directory. */ priv_set_remove_linkdir (); - while ((c = getopt_long (argc, argv, "dfirvIR", long_opts, NULL)) != -1) + while ((c = getopt_long (argc, argv, "firvIR", long_opts, NULL)) != -1) { switch (c) { - case 'd': - /* Ignore this option, for backward compatibility with - coreutils 5.92. FIXME: Some time after 2005, change this - to report an error (or perhaps behave like FreeBSD does) - instead of ignoring the option. */ - break; - case 'f': x.interactive = RMI_NEVER; x.ignore_missing_files = true;