[Ocfs2-tools-devel] [PATCH 1/1] ocfs2-tools: Add setting custom UUID in tunefs.ocfs2

Joel Becker Joel.Becker at oracle.com
Thu Jun 10 12:45:44 PDT 2010


On Thu, Jun 10, 2010 at 09:57:27AM -0700, Sunil Mushran wrote:
> On 06/10/2010 09:08 AM, Tiger Yang wrote:
> >This patch enhance uuid-reset operation to set custom UUID.
> >The format of the UUID could be 32 bytes or 36 bytes.
> >For example: 178BDC83D50241EF94EB474A677d498B or
> >178BDC83-D502-41EF-94EB-474A677D498B.
> 
> We have been moving away from the traditional uuid format.
> What do others think? Should we support both inputs? I am
> inclined to support only the first input as that is what -Q "%U"
> "stats" in debugfs.ocfs2, etc., returns.

	I've actually been wondering if we should be moving towards the
libuuid format.  Other places in the system, like udev and blkid, report
that format.  Isn't it confusing for others?

> >  static struct tunefs_option reset_uuid_option = {
> >  	.opt_option	= {
> >-		.name	= "uuid-reset",
> >-		.val	= 'U',
> >+		.name		= "uuid-reset",
> >+		.val		= 'U',
> >+		.has_arg	= 2,
> >  	},
> >-	.opt_help	= "-U|--uuid-reset",
> >+	.opt_help	= "-U[new-uuid]|--uuid-reset[=new-uuid]",
> >+	.opt_handle	=&generic_handle_arg,
> >  	.opt_op		=&reset_uuid_op,
> 
> +	.opt_help	= "-U|--uuid-reset [new-uuid]",

	No can do.  Optional arguments can't be separated by a space.

Joel

-- 

"There is shadow under this red rock.
 (Come in under the shadow of this red rock)
 And I will show you something different from either
 Your shadow at morning striding behind you
 Or your shadow at evening rising to meet you.
 I will show you fear in a handful of dust."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-tools-devel mailing list