Subject: bug#6402: [PATCH] rm: added --directory (-d) option

From: Eric Blake <[email-masked]>
Date: Wed, 15 Sep 2010 16:23:33 -0600

On 08/18/2010 07:05 AM, William Plusnick wrote:
> Sorry to take so long to reply, life got busy all of a sudden.

Equally sorry for my delay in turn.  Now are we even?  :)

>I took your
> advice and instead made a trivial patch (I don't think I will have to sign
> anything) that instead prints an error message that points them to rmdir and
> exits.

Thanks for the patch.  However, it's harder to review patches that 
aren't sent as plain/text MIME types.  Here's the meat:

> @@ -227,10 +227,10 @@ main (int argc, char **argv)
>        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.  */
> +          /* This is not supported by vote of the maintainers. Print
> +           * an error message rather than ignore it.   */
> +          error (EXIT_FAILURE, 0, "the -d flag is not supported in rm(1)"
> +                                  ", please see rmdir(1) instead.");
>            break;

Indeed trivial, but missing translation of the string.  At any rate, 
it's certainly after 2005, so according to our own comment, we indeed 
should do something very similar to what you have proposed!

-- 
Eric Blake   [email-masked]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org