Hi,
On 10/03/2012 07:20 PM, Ilya Dryomov wrote:
filesystem_cmd_group_usage, NULL, {
> >>- { "df", cmd_df, cmd_df_usage, NULL, 0 },
> >>+ { "df", cmd_disk_free, cmd_disk_free_usage, NULL, 0 },
> >
> >If this command is going to replace df, you should change the function
> >name back to cmd_df.
>
> I was never convinced to use 'df'. At the beginning when I wrote the
> first parser of btrfs, was suggested (not by me) to use "long"
> command and allow the parser to match a contracted command until
> there was any ambiguity. I suggested to use disk-free, but everybody
> were confortable with df.. so I leaved it as "official name". But I
> prefer for the internal code a more verbose name.
Well, all your patch is doing is extending the functionality of an
existing command. The "official name" for that command is "df", and you
are not changing its name.
I would like change the name of the command from df to disk-free.
Unfortunately (for me) Chris ask to leaved the old name...
> Why change the name of an existing function?
Strictly speaking, I never changed the name of the function. At the
beginning I added another command (who was named disk-usage), then Chris
asked to replace df with the new one. So I removed the old one.
Seeing the patch it seems that I changed the name, but the truth is that
I added a new one then removed the old one. Due to how the patch is
generated it seems another thing.
But this doesn't change too much.
The point is that the function name doesn't match the command name. It
is not the single case: look at the function cmd_send_start()
(associated to the send command), cmd_defrag() )associated to the
command defragment....)
BR
G.Baroncelli
Thanks,
Ilya
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html