[PATCH] Document powerpc nvram parameters

Samuel Mendoza-Jonas sam at mendozajonas.com
Thu Jun 2 16:40:59 AEST 2016


On Wed, Jun 01, 2016 at 06:15:36PM -0300, Murilo Opsfelder Araujo wrote:
> Signed-off-by: Murilo Opsfelder Araujo <muriloo at linux.vnet.ibm.com>
> ---
>  discover/platform-powerpc.c | 39 ++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 38 insertions(+), 1 deletion(-)
> 
> diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c
> index 1961304..563e0ad 100644
> --- a/discover/platform-powerpc.c
> +++ b/discover/platform-powerpc.c
> @@ -51,14 +51,51 @@ struct platform_powerpc {
> 
>  static const char *known_params[] = {
>  	"auto-boot?",
> +	/* Whether Petitboot should automatically boot.  (true or
> +	 * false)
> +	 */
> +
>  	"petitboot,network",
> +	/* Network settings.  Examples:
> +	 *
> +	 * petitboot,network=aa:bb:cc:dd:ee:ff,dhcp
> +	 * petitboot,network=aa:bb:cc:dd:ee:ff,static,192.168.1.2/24,192.168.1.1 dns,192.168.1.1
> +	 */
> +
>  	"petitboot,timeout",
> -	"petitboot,bootdev",
> +	/* How many seconds Petitboot should wait until auto-booting.
> +	 * (Integer)
> +	 */
> +
> +	"petitboot,bootdev",  /* deprecated */
>  	"petitboot,bootdevs",
> +	/* Space-separated list defining the relative boot priority of
> +	 * certain devices, e.g. boot a specific disk first, otherwise
> +	 * network.  Example:
> +	 *
> +	 * petitboot,bootdevs=uuid:a46c84b3-366a-4b38-880a-f674c30d490d network
> +	 */
> +
>  	"petitboot,language",
> +	/* Set UI default language.  Example:
> +	 *
> +	 * petitboot,language=es_ES.utf8
> +	 */
> +
>  	"petitboot,debug?",
> +	/* Debug flag to increase logging verbosity.  (true or
> +	 * false) */
> +
>  	"petitboot,write?",
> +	/* Whether Petitboot should be allowed to make changes to
> +	 * disks.  (true or false)
> +	 */
> +
>  	"petitboot,snapshots?",
> +	/* Whether Petitboot should use device-mapper snapshots when
> +	 * mounting disks.  (true or false)
> +	 */
> +
>  	NULL,
>  };
> 

Thanks Murilo! I like the idea of documenting these options *somewhere*,
but I'm not sure inline in the array is the place, it adds a lot of
height to the declaration. Perhaps it could go above the array slightly
compressed instead?
I suppose the question is, who is the intended audience for this
information. If it's for developers, perhaps each parameter can be
described in the function that interprets it. If it's for users (which
for 90% of cases it probably shouldn't be) then maybe it could go in
some other documentation, whether a file in the source tree, or on a
website.
Thoughts?

sam

> --
> 2.9.0.rc1
> 
> _______________________________________________
> Petitboot mailing list
> Petitboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/petitboot



More information about the Petitboot mailing list