|
|
|
Re: [PATCH 2/2] fdisk: API: comment labels array | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On Tue, Jul 24, 2012 at 02:40:30PM +0200, Davidlohr Bueso wrote:
> From: Davidlohr Bueso <dave@xxxxxxx>
>
> Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
> ---
> fdisks/utils.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/fdisks/utils.c b/fdisks/utils.c
> index 8de64c2..c4ffe04 100644
> --- a/fdisks/utils.c
> +++ b/fdisks/utils.c
> @@ -35,7 +35,9 @@
> int fdisk_debug_mask;
>
> /*
> - * label probing functions
> + * Label probing functions.
> + * Must have the same order as fdisk_labeltype as the index
> + * depends on it.
This (rely on comment) is bad way.
> */
> static const struct fdisk_label *labels[] =
> {
Use:
static const struct fdisk_label[] =
{
[XXX_LABEL] = &xxx_label,
[YYY_LABEL] = &yyy_label
}
Karel
--
Karel Zak <kzak@xxxxxxxxxx>
http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Netdev] [Ethernet Bridging] [Linux Wireless] [Kernel Newbies] [Memory] [Security] [Linux for Hams] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux RAID] [Linux Admin] [Samba] [Video 4 Linux] [Linux Resources]