All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kickstart: document which options accept units
@ 2021-08-12 16:01 o.mandel
  2021-08-13  8:05 ` [docs] " Quentin Schulz
  0 siblings, 1 reply; 9+ messages in thread
From: o.mandel @ 2021-08-12 16:01 UTC (permalink / raw)
  To: docs; +Cc: Olaf Mandel

Document which units are accepted as parameters for the four options
that accept units. Also be pedantic about using binary instead of
decimal prefixes so readers don't have to wonder.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
---
 documentation/ref-manual/kickstart.rst | 31 +++++++++++++++++---------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/documentation/ref-manual/kickstart.rst b/documentation/ref-manual/kickstart.rst
index fc723ccbe..b5ffb2a4e 100644
--- a/documentation/ref-manual/kickstart.rst
+++ b/documentation/ref-manual/kickstart.rst
@@ -65,13 +65,18 @@ Here is an example that uses "/" as the mountpoint. The command uses
 Here is a list that describes other supported options you can use with
 the ``part`` and ``partition`` commands:
 
--  ``--size``: The minimum partition size in MBytes. Specify an
-   integer value such as 500. Do not append the number with "MB". You do
-   not need this option if you use ``--source``.
-
--  ``--fixed-size``: The exact partition size in MBytes. You cannot
-   specify with ``--size``. An error occurs when assembling the disk
-   image if the partition data is larger than ``--fixed-size``.
+-  ``--size (in MBytes)``: The minimum partition size. Specify as an
+   integer value optionally followed by one of the units "k" / "K" for
+   kibibyte, "M" for mebibyte and "G" for gibibyte. The default unit
+   if none is given is "M". You do not need this option if you use
+   ``--source``.
+
+-  ``--fixed-size (in MBytes)``: The exact partition size. Specify as an
+   integer value optionally followed by one of the units "k" / "K" for
+   kibibyte, "M" for mebibyte and "G" for gibibyte. The default unit
+   if none is given is "M".  Cannot be specify together with ``--size``.
+   An error occurs when assembling the disk image if the partition data
+   is larger than ``--fixed-size``.
 
 -  ``--source``: This option is a Wic-specific option that names the
    source of the data that populates the partition. The most common
@@ -137,7 +142,10 @@ the ``part`` and ``partition`` commands:
 -  ``--offset (in KBytes)``: This option is a Wic-specific option that
    says to place a partition at exactly the specified offset. If the
    partition cannot be placed at the specified offset, the image build
-   will fail.
+   will fail. Specify as an integer value optionally followed by one of
+   the units "s" / "S" for 512Byte sector, "k" / "K" for kibibyte, "M"
+   for mebibyte and "G" for gibibyte. The default unit if none is given
+   is "k".
 
 -  ``--no-table``: This option is a Wic-specific option. Using the
    option reserves space for the partition and causes it to become
@@ -148,10 +156,13 @@ the ``part`` and ``partition`` commands:
    excludes the given relative path from the resulting image. This
    option is only effective with the rootfs source plugin.
 
--  ``--extra-space``: This option is a Wic-specific option that adds
+-  ``--extra-space (in MBytes)``: This option is a Wic-specific option that adds
    extra space after the space filled by the content of the partition.
    The final size can exceed the size specified by the ``--size``
-   option. The default value is 10 Mbytes.
+   option. The default value is 10 Mbytes. Specify as an integer value
+   optionally followed by one of the units "k" / "K" for kibibyte, "M"
+   for mebibyte and "G" for gibibyte. The default unit if none is given
+   is "M".
 
 -  ``--overhead-factor``: This option is a Wic-specific option that
    multiplies the size of the partition by the option's value. You must
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [docs] [PATCH] kickstart: document which options accept units
  2021-08-12 16:01 [PATCH] kickstart: document which options accept units o.mandel
@ 2021-08-13  8:05 ` Quentin Schulz
  2021-08-13  8:35   ` [PATCH v2] " o.mandel
  2021-08-13  8:44   ` [docs] [PATCH] " o.mandel
  0 siblings, 2 replies; 9+ messages in thread
From: Quentin Schulz @ 2021-08-13  8:05 UTC (permalink / raw)
  To: o.mandel; +Cc: docs

Hi Olaf,

Thanks for the patch!

On Thu, Aug 12, 2021 at 04:01:33PM +0000, o.mandel@menlosystems.com wrote:
> Document which units are accepted as parameters for the four options
> that accept units. Also be pedantic about using binary instead of
> decimal prefixes so readers don't have to wonder.
> 
> Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
> ---
>  documentation/ref-manual/kickstart.rst | 31 +++++++++++++++++---------
>  1 file changed, 21 insertions(+), 10 deletions(-)
> 
> diff --git a/documentation/ref-manual/kickstart.rst b/documentation/ref-manual/kickstart.rst
> index fc723ccbe..b5ffb2a4e 100644
> --- a/documentation/ref-manual/kickstart.rst
> +++ b/documentation/ref-manual/kickstart.rst
> @@ -65,13 +65,18 @@ Here is an example that uses "/" as the mountpoint. The command uses
>  Here is a list that describes other supported options you can use with
>  the ``part`` and ``partition`` commands:
>  
> --  ``--size``: The minimum partition size in MBytes. Specify an
> -   integer value such as 500. Do not append the number with "MB". You do
> -   not need this option if you use ``--source``.
> -
> --  ``--fixed-size``: The exact partition size in MBytes. You cannot
> -   specify with ``--size``. An error occurs when assembling the disk
> -   image if the partition data is larger than ``--fixed-size``.
> +-  ``--size (in MBytes)``: The minimum partition size. Specify as an

I'm not really fond of saying it's in MBytes here just to say a sentence
later that it can be something else. Especially since I would understand
35K to be 35000 MBytes and not 35 KiB.
The explanation is sufficient to me, it's less confusing IMO.

In any case, if we keep it, it should say MiBytes and not MBytes since
in the description you say it's mebibytes and not megabytes.

> +   integer value optionally followed by one of the units "k" / "K" for
> +   kibibyte, "M" for mebibyte and "G" for gibibyte. The default unit
> +   if none is given is "M". You do not need this option if you use
> +   ``--source``.
> +
> +-  ``--fixed-size (in MBytes)``: The exact partition size. Specify as an

Same remark.

> +   integer value optionally followed by one of the units "k" / "K" for
> +   kibibyte, "M" for mebibyte and "G" for gibibyte. The default unit
> +   if none is given is "M".  Cannot be specify together with ``--size``.
> +   An error occurs when assembling the disk image if the partition data
> +   is larger than ``--fixed-size``.
>  
>  -  ``--source``: This option is a Wic-specific option that names the
>     source of the data that populates the partition. The most common
> @@ -137,7 +142,10 @@ the ``part`` and ``partition`` commands:
>  -  ``--offset (in KBytes)``: This option is a Wic-specific option that
>     says to place a partition at exactly the specified offset. If the
>     partition cannot be placed at the specified offset, the image build
> -   will fail.
> +   will fail. Specify as an integer value optionally followed by one of
> +   the units "s" / "S" for 512Byte sector, "k" / "K" for kibibyte, "M"
> +   for mebibyte and "G" for gibibyte. The default unit if none is given
> +   is "k".
>  

Same remark.

>  -  ``--no-table``: This option is a Wic-specific option. Using the
>     option reserves space for the partition and causes it to become
> @@ -148,10 +156,13 @@ the ``part`` and ``partition`` commands:
>     excludes the given relative path from the resulting image. This
>     option is only effective with the rootfs source plugin.
>  
> --  ``--extra-space``: This option is a Wic-specific option that adds
> +-  ``--extra-space (in MBytes)``: This option is a Wic-specific option that adds

Same remark.

>     extra space after the space filled by the content of the partition.
>     The final size can exceed the size specified by the ``--size``
> -   option. The default value is 10 Mbytes.
> +   option. The default value is 10 Mbytes. Specify as an integer value

MiBytes instead of MBytes I assume.

Cheers,
Quentin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] kickstart: document which options accept units
  2021-08-13  8:05 ` [docs] " Quentin Schulz
@ 2021-08-13  8:35   ` o.mandel
  2021-08-13  8:37     ` Quentin Schulz
  2021-08-13  8:44   ` [docs] [PATCH] " o.mandel
  1 sibling, 1 reply; 9+ messages in thread
From: o.mandel @ 2021-08-13  8:35 UTC (permalink / raw)
  To: docs; +Cc: Olaf Mandel, Quentin Schulz

Document which units are accepted as parameters for the four options
that accept units. Also be pedantic about using binary instead of
decimal prefixes so readers don't have to wonder.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
CC: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 documentation/ref-manual/kickstart.rst | 30 +++++++++++++++++---------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/documentation/ref-manual/kickstart.rst b/documentation/ref-manual/kickstart.rst
index fc723ccbe..595b9e8c1 100644
--- a/documentation/ref-manual/kickstart.rst
+++ b/documentation/ref-manual/kickstart.rst
@@ -65,13 +65,17 @@ Here is an example that uses "/" as the mountpoint. The command uses
 Here is a list that describes other supported options you can use with
 the ``part`` and ``partition`` commands:
 
--  ``--size``: The minimum partition size in MBytes. Specify an
-   integer value such as 500. Do not append the number with "MB". You do
-   not need this option if you use ``--source``.
-
--  ``--fixed-size``: The exact partition size in MBytes. You cannot
-   specify with ``--size``. An error occurs when assembling the disk
-   image if the partition data is larger than ``--fixed-size``.
+-  ``--size``: The minimum partition size. Specify as an integer value
+   optionally followed by one of the units "k" / "K" for kibibyte,
+   "M" for mebibyte and "G" for gibibyte. The default unit if none is
+   given is "M". You do not need this option if you use ``--source``.
+
+-  ``--fixed-size``: The exact partition size. Specify as an integer
+   value optionally followed by one of the units "k" / "K" for kibibyte,
+   "M" for mebibyte and "G" for gibibyte. The default unit if none is
+   given is "M".  Cannot be specify together with ``--size``. An error
+   occurs when assembling the disk image if the partition data is larger
+   than ``--fixed-size``.
 
 -  ``--source``: This option is a Wic-specific option that names the
    source of the data that populates the partition. The most common
@@ -134,10 +138,13 @@ the ``part`` and ``partition`` commands:
 -  ``--align (in KBytes)``: This option is a Wic-specific option that
    says to start partitions on boundaries given x KBytes.
 
--  ``--offset (in KBytes)``: This option is a Wic-specific option that
+-  ``--offset``: This option is a Wic-specific option that
    says to place a partition at exactly the specified offset. If the
    partition cannot be placed at the specified offset, the image build
-   will fail.
+   will fail. Specify as an integer value optionally followed by one of
+   the units "s" / "S" for 512Byte sector, "k" / "K" for kibibyte, "M"
+   for mebibyte and "G" for gibibyte. The default unit if none is given
+   is "k".
 
 -  ``--no-table``: This option is a Wic-specific option. Using the
    option reserves space for the partition and causes it to become
@@ -151,7 +158,10 @@ the ``part`` and ``partition`` commands:
 -  ``--extra-space``: This option is a Wic-specific option that adds
    extra space after the space filled by the content of the partition.
    The final size can exceed the size specified by the ``--size``
-   option. The default value is 10 Mbytes.
+   option. The default value is 10M. Specify as an integer value
+   optionally followed by one of the units "k" / "K" for kibibyte, "M"
+   for mebibyte and "G" for gibibyte. The default unit if none is given
+   is "M".
 
 -  ``--overhead-factor``: This option is a Wic-specific option that
    multiplies the size of the partition by the option's value. You must
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] kickstart: document which options accept units
  2021-08-13  8:35   ` [PATCH v2] " o.mandel
@ 2021-08-13  8:37     ` Quentin Schulz
  2021-08-13  8:48       ` [PATCH v3] " o.mandel
  0 siblings, 1 reply; 9+ messages in thread
From: Quentin Schulz @ 2021-08-13  8:37 UTC (permalink / raw)
  To: Olaf Mandel; +Cc: docs

Hi Olaf,

On Fri, Aug 13, 2021 at 08:35:09AM +0000, Olaf Mandel wrote:
> Document which units are accepted as parameters for the four options
> that accept units. Also be pedantic about using binary instead of
> decimal prefixes so readers don't have to wonder.
> 
> Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
> CC: Quentin Schulz <quentin.schulz@theobroma-systems.com>

Reviewed-by: Quentin Schulz <foss@0leil.net>

Thanks!
Quentin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [docs] [PATCH] kickstart: document which options accept units
  2021-08-13  8:05 ` [docs] " Quentin Schulz
  2021-08-13  8:35   ` [PATCH v2] " o.mandel
@ 2021-08-13  8:44   ` o.mandel
  1 sibling, 0 replies; 9+ messages in thread
From: o.mandel @ 2021-08-13  8:44 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: docs


[-- Attachment #1.1: Type: text/plain, Size: 1592 bytes --]

Hello Quentin,

thank you for having a look. I haven't figured out how to prepend a 
reply in front of the v2 patch, so replying here as a separate eMail.

Am 13.08.2021 um 10:05 schrieb Quentin Schulz:
> On Thu, Aug 12, 2021 at 04:01:33PM +0000, o.mandel@menlosystems.com wrote:
>> --  ``--size``: The minimum partition size in MBytes. Specify an
>> [...]
>> +-  ``--size (in MBytes)``: The minimum partition size. Specify as an
> 
> I'm not really fond of saying it's in MBytes here just to say a sentence
> later that it can be something else. Especially since I would understand
> 35K to be 35000 MBytes and not 35 KiB.
> The explanation is sufficient to me, it's less confusing IMO.
> 
Removed in v2. I tried to unify the format I saw in some other options, 
but yes: it makes no sense here.

> [...]
>>      extra space after the space filled by the content of the partition.
>>      The final size can exceed the size specified by the ``--size``
>> -   option. The default value is 10 Mbytes.
>> +   option. The default value is 10 Mbytes. Specify as an integer value
> 
> MiBytes instead of MBytes I assume.
> 
Yes. I went with just saying 10M in v2 for brevity: the explanation of 
that is right in the next sentence.

Thanks,
Olaf
-- 
Olaf Mandel
Tel +49 89 189 166 0
Fax +49 89 189 166 111
o.mandel@menlosystems.com
https://www.menlosystems.com

Menlo Systems GmbH
Bunsenstraße 5, D-82152 Martinsried

Geschäftsführung: Dr Michael Mei, Dr Ronald Holzwarth
USt-IdNr. DE217772017, St.-Nr. 14316170324
Amtsgericht München HRB 138145


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 505 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3] kickstart: document which options accept units
  2021-08-13  8:37     ` Quentin Schulz
@ 2021-08-13  8:48       ` o.mandel
  2021-08-13  8:52         ` [docs] " Quentin Schulz
  2021-08-13  9:42         ` Michael Opdenacker
  0 siblings, 2 replies; 9+ messages in thread
From: o.mandel @ 2021-08-13  8:48 UTC (permalink / raw)
  To: docs; +Cc: Olaf Mandel, Quentin Schulz

Document which units are accepted as parameters for the four options
that accept units. Also be pedantic about using binary instead of
decimal prefixes so readers don't have to wonder.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Reviewed-by: Quentin Schulz <foss@0leil.net>
---
 documentation/ref-manual/kickstart.rst | 30 +++++++++++++++++---------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/documentation/ref-manual/kickstart.rst b/documentation/ref-manual/kickstart.rst
index fc723ccbe..595b9e8c1 100644
--- a/documentation/ref-manual/kickstart.rst
+++ b/documentation/ref-manual/kickstart.rst
@@ -65,13 +65,17 @@ Here is an example that uses "/" as the mountpoint. The command uses
 Here is a list that describes other supported options you can use with
 the ``part`` and ``partition`` commands:
 
--  ``--size``: The minimum partition size in MBytes. Specify an
-   integer value such as 500. Do not append the number with "MB". You do
-   not need this option if you use ``--source``.
-
--  ``--fixed-size``: The exact partition size in MBytes. You cannot
-   specify with ``--size``. An error occurs when assembling the disk
-   image if the partition data is larger than ``--fixed-size``.
+-  ``--size``: The minimum partition size. Specify as an integer value
+   optionally followed by one of the units "k" / "K" for kibibyte,
+   "M" for mebibyte and "G" for gibibyte. The default unit if none is
+   given is "M". You do not need this option if you use ``--source``.
+
+-  ``--fixed-size``: The exact partition size. Specify as an integer
+   value optionally followed by one of the units "k" / "K" for kibibyte,
+   "M" for mebibyte and "G" for gibibyte. The default unit if none is
+   given is "M".  Cannot be specify together with ``--size``. An error
+   occurs when assembling the disk image if the partition data is larger
+   than ``--fixed-size``.
 
 -  ``--source``: This option is a Wic-specific option that names the
    source of the data that populates the partition. The most common
@@ -134,10 +138,13 @@ the ``part`` and ``partition`` commands:
 -  ``--align (in KBytes)``: This option is a Wic-specific option that
    says to start partitions on boundaries given x KBytes.
 
--  ``--offset (in KBytes)``: This option is a Wic-specific option that
+-  ``--offset``: This option is a Wic-specific option that
    says to place a partition at exactly the specified offset. If the
    partition cannot be placed at the specified offset, the image build
-   will fail.
+   will fail. Specify as an integer value optionally followed by one of
+   the units "s" / "S" for 512Byte sector, "k" / "K" for kibibyte, "M"
+   for mebibyte and "G" for gibibyte. The default unit if none is given
+   is "k".
 
 -  ``--no-table``: This option is a Wic-specific option. Using the
    option reserves space for the partition and causes it to become
@@ -151,7 +158,10 @@ the ``part`` and ``partition`` commands:
 -  ``--extra-space``: This option is a Wic-specific option that adds
    extra space after the space filled by the content of the partition.
    The final size can exceed the size specified by the ``--size``
-   option. The default value is 10 Mbytes.
+   option. The default value is 10M. Specify as an integer value
+   optionally followed by one of the units "k" / "K" for kibibyte, "M"
+   for mebibyte and "G" for gibibyte. The default unit if none is given
+   is "M".
 
 -  ``--overhead-factor``: This option is a Wic-specific option that
    multiplies the size of the partition by the option's value. You must
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [docs] [PATCH v3] kickstart: document which options accept units
  2021-08-13  8:48       ` [PATCH v3] " o.mandel
@ 2021-08-13  8:52         ` Quentin Schulz
  2021-08-13  9:43           ` Michael Opdenacker
  2021-08-13  9:42         ` Michael Opdenacker
  1 sibling, 1 reply; 9+ messages in thread
From: Quentin Schulz @ 2021-08-13  8:52 UTC (permalink / raw)
  To: o.mandel; +Cc: docs, Quentin Schulz

Hi Olaf,

On Fri, Aug 13, 2021 at 08:48:55AM +0000, o.mandel@menlosystems.com wrote:
> Document which units are accepted as parameters for the four options
> that accept units. Also be pedantic about using binary instead of
> decimal prefixes so readers don't have to wonder.
> 
> Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
> Reviewed-by: Quentin Schulz <foss@0leil.net>

If the content of the patch is the same as v2, there's no need to send a
v3 to add my Reviewed-by, the maintainer will do it when merging the
patch :)

Thanks again!
Cheers,
Quentin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [docs] [PATCH v3] kickstart: document which options accept units
  2021-08-13  8:48       ` [PATCH v3] " o.mandel
  2021-08-13  8:52         ` [docs] " Quentin Schulz
@ 2021-08-13  9:42         ` Michael Opdenacker
  1 sibling, 0 replies; 9+ messages in thread
From: Michael Opdenacker @ 2021-08-13  9:42 UTC (permalink / raw)
  To: o.mandel, docs; +Cc: Quentin Schulz

Hi Olaf,

Many thanks for the patch, and thanks to Quentin for the review!

On 8/13/21 10:48 AM, o.mandel@menlosystems.com wrote:
>  
> --  ``--offset (in KBytes)``: This option is a Wic-specific option that
> +-  ``--offset``: This option is a Wic-specific option that
>     says to place a partition at exactly the specified offset. If the
>     partition cannot be placed at the specified offset, the image build
> -   will fail.
> +   will fail. Specify as an integer value optionally followed by one of
> +   the units "s" / "S" for 512Byte sector, "k" / "K" for kibibyte, "M"
> +   for mebibyte and "G" for gibibyte. The default unit if none is given
> +   is "k".
>  

I replaced "512Byte" by "512 byte".
Don't hesitate to protest if you disagree!

Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
and merged into the "master-next" branch.

Thanks again!

-- 
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [docs] [PATCH v3] kickstart: document which options accept units
  2021-08-13  8:52         ` [docs] " Quentin Schulz
@ 2021-08-13  9:43           ` Michael Opdenacker
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Opdenacker @ 2021-08-13  9:43 UTC (permalink / raw)
  To: Quentin Schulz, o.mandel; +Cc: docs, Quentin Schulz


On 8/13/21 10:52 AM, Quentin Schulz wrote:
> Hi Olaf,
>
> On Fri, Aug 13, 2021 at 08:48:55AM +0000, o.mandel@menlosystems.com wrote:
>> Document which units are accepted as parameters for the four options
>> that accept units. Also be pedantic about using binary instead of
>> decimal prefixes so readers don't have to wonder.
>>
>> Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
>> Reviewed-by: Quentin Schulz <foss@0leil.net>
> If the content of the patch is the same as v2, there's no need to send a
> v3 to add my Reviewed-by, the maintainer will do it when merging the
> patch :)


Indeed. But that's natural to assume this when you begin. I did too :)
Cheers

Michael.

-- 
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-13  9:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-12 16:01 [PATCH] kickstart: document which options accept units o.mandel
2021-08-13  8:05 ` [docs] " Quentin Schulz
2021-08-13  8:35   ` [PATCH v2] " o.mandel
2021-08-13  8:37     ` Quentin Schulz
2021-08-13  8:48       ` [PATCH v3] " o.mandel
2021-08-13  8:52         ` [docs] " Quentin Schulz
2021-08-13  9:43           ` Michael Opdenacker
2021-08-13  9:42         ` Michael Opdenacker
2021-08-13  8:44   ` [docs] [PATCH] " o.mandel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.