> -Original Message-
> From: David Sterba [mailto:dste...@suse.cz]
> Sent: Tuesday, August 22, 2017 10:04 PM
> To: Gu, Jinxiang/顾 金香 <g...@cn.fujitsu.com>; linux-btrfs@vger.kernel.org
> Subject: Re: [PATCH] btrfs-progs: mkfs: Replace number with enum
>
> On
On Mon, Aug 21, 2017 at 07:39:49PM +0200, David Sterba wrote:
> > +/* roots: root tree, extent tree, chunk tree, dev tree, fs tree, csum tree
> > */
> > +enum btrfs_mkfs_block {
> > + SUPER_BLOCK = 0,
> > + ROOT_TREE,
> > + EXTENT_TREE,
> > + CHUNK_TREE,
> > + DEV_TREE,
> > + FS_TREE,
On Wed, Jun 28, 2017 at 05:59:24PM +0800, Gu Jinxiang wrote:
> For code maintainability and scalability,
> replace hardcoded constant with a meaningful enum.
>
> Signed-off-by: Gu Jinxiang
Sorry for late reply. Patch applied with some tweaks, the added enum
names are too
For code maintainability and scalability,
replace hardcoded constant with a meaningful enum.
Signed-off-by: Gu Jinxiang
---
mkfs/common.c | 47 ---
mkfs/common.h | 14 +-
2 files changed, 37 insertions(+), 24