bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch In Progress] rm -d, --directory


From: Eric Blake
Subject: Re: [Patch In Progress] rm -d, --directory
Date: Thu, 04 Mar 2010 12:23:25 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

According to William Plusnick on 3/4/2010 9:02 AM:
> Hello,
> I am working on a patch that adds a FreeBSD style directory option, as
> suggested in the rm.c source code. The --directory (-d) option will
> delete empty directories, as well as the usual files, passed via
> command line.

Thanks for doing this.  Normally, adding new options (especially short
options, like -d) is difficult, but by pointing to prior practice in the
BSD implementation, you've already got the justification for this.

> I am now in the documentation stages and nearing
> completion (all the functionality is working). I have a few questions
> mostly regarding legal issues.
> 
> I know that I will have to sign some papers, after an email exchange
> with the Free Software Foundation. Who do I email to start this
> transaction? Also, I am only 15 years old, will this complicate
> anything, legal wise, anymore than it would be normally?

I'm sending you the contact information off-list.  As to whether your age
has an impact, that will be a question for the FSF contact to answer.

> 
> Where do I post my patch, when completed, for approval? Do you want
> the modified files each to have their own separate patches or all of the
> files
> to be in one large patch? Do you want the documentation patch separate
> from the source code patch?

Definitely an atomic commit per conceptual change, where a commit consists
of changes to multiple files.  Mail the proposed patches to this list.
The best thing to do would be reading up on our HACKING guidelines:
http://git.sv.gnu.org/cgit/coreutils.git/tree/HACKING

You are basing your patches on the latest git, right?

> 
> If the check to see if the directory is empty fails, I print an error
> message. Currently I am using this form:
> error (0, 0, "couldn't remove %s : Directory not empty");

error (ENOTEMPTY, 0, _("couldn't remove %s"));

Using the correct errno, error() will automatically append the ":
Directory not empty".  Also, note that I marked the string for
translation.  Actually, depending on the syscall you used to determine
whether the directory is non-empty, you may want to use errno directly
rather than hardcoding ENOTEMPTY, in case there are other failures also
worth reporting.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]