Re: [PATCH 07/22] mkfs: Move opts related #define to one place

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

 



On Wed, Mar 15, 2017 at 05:00:02PM +0100, Jan Tulak wrote:
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index 0877c196..4ba6df05 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -48,6 +48,80 @@ unsigned int		sectorsize;
>  #define MAX_CONFLICTS	8
>  #define LAST_CONFLICT	(-1)
>  
> +#define OPT_B		0
> +#define B_LOG		0
> +#define B_SIZE		1

How about instead using enums, this way if we use kdoc format (hey the new
kernel doc format is producing nicer docs) we can then document what the
hell each of these things are nicely. Also, when enums are used in switches
the compiler will nag at you if you happened to have missed a case, unless you
have a default.

We could have an enum for the opts and then one for each subopt group.

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux