Re: [PATCH v3 06/37] Documentation/binfmt_misc.txt: convert it to ReST markup

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

 



Am 24.10.2016 um 13:00 schrieb Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>:

> - Fix identation for the document title;
> - use monotonic fonts for commands, paths, etc;
> - use quote blocks where needed;
> - adjust spaces to properly format paragraphs;
> - add it to the user book.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>
> ---
> Documentation/binfmt_misc.txt | 134 ++++++++++++++++++++++++------------------
> 1 file changed, 77 insertions(+), 57 deletions(-)
> 
> diff --git a/Documentation/binfmt_misc.txt b/Documentation/binfmt_misc.txt
> index ec83bbce547a..9c5ff8f260bf 100644
> --- a/Documentation/binfmt_misc.txt
> +++ b/Documentation/binfmt_misc.txt
> @@ -1,5 +1,5 @@
> -     Kernel Support for miscellaneous (your favourite) Binary Formats v1.1
> -     =====================================================================
> +Kernel Support for miscellaneous (your favourite) Binary Formats v1.1
> +=====================================================================
> 
> This Kernel feature allows you to invoke almost (for restrictions see below)
> every program by simply typing its name in the shell.
> @@ -9,122 +9,142 @@ To achieve this you must tell binfmt_misc which interpreter has to be invoked
> with which binary. Binfmt_misc recognises the binary-type by matching some bytes
> at the beginning of the file with a magic byte sequence (masking out specified
> bits) you have supplied. Binfmt_misc can also recognise a filename extension
> -aka '.com' or '.exe'.
> +aka ``.com`` or ``.exe``.
> 
> -First you must mount binfmt_misc:
> -	mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc 
> +First you must mount binfmt_misc::
> +
> +	mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
> 
> To actually register a new binary type, you have to set up a string looking like
> -:name:type:offset:magic:mask:interpreter:flags (where you can choose the ':'
> -upon your needs) and echo it to /proc/sys/fs/binfmt_misc/register.
> +``:name:type:offset:magic:mask:interpreter:flags`` (where you can choose the
> +``:`` upon your needs) and echo it to ``/proc/sys/fs/binfmt_misc/register``.
> 
> Here is what the fields mean:
> - - 'name' is an identifier string. A new /proc file will be created with this
> -   name below /proc/sys/fs/binfmt_misc; cannot contain slashes '/' for obvious
> -   reasons.
> - - 'type' is the type of recognition. Give 'M' for magic and 'E' for extension.
> - - 'offset' is the offset of the magic/mask in the file, counted in bytes. This
> -   defaults to 0 if you omit it (i.e. you write ':name:type::magic...'). Ignored
> -   when using filename extension matching.
> - - 'magic' is the byte sequence binfmt_misc is matching for. The magic string
> -   may contain hex-encoded characters like \x0a or \xA4. Note that you must
> -   escape any NUL bytes; parsing halts at the first one. In a shell environment
> -   you might have to write \\x0a to prevent the shell from eating your \.
> +
> +- ``name``
> +   is an identifier string. A new /proc file will be created with this
> +   ``name below /proc/sys/fs/binfmt_misc``; cannot contain slashes ``/`` for
> +   obvious reasons.
> +- ``type``
> +   is the type of recognition. Give ``M`` for magic and ``E`` for extension.
> +- ``offset``
> +   is the offset of the magic/mask in the file, counted in bytes. This
> +   defaults to 0 if you omit it (i.e. you write ``:name:type::magic...``).
> +   Ignored when using filename extension matching.

again, sorry for nitpicking, IMO a blank line after each list item
would make it more readable.

....

> +   certain aspect. The following flags are supported:
> +
> +      ``P`` - preserve-argv[0]
> +            Legacy behavior of binfmt_misc is to overwrite
>            the original argv[0] with the full path to the binary. When this
>            flag is included, binfmt_misc will add an argument to the argument
> -            vector for this purpose, thus preserving the original argv[0].
> -            e.g. If your interp is set to /bin/foo and you run `blah` (which is
> -            in /usr/local/bin), then the kernel will execute /bin/foo with
> -            argv[] set to ["/bin/foo", "/usr/local/bin/blah", "blah"].  The
> -            interp has to be aware of this so it can execute /usr/local/bin/blah
> -            with argv[] set to ["blah"].
> -      'O' - open-binary. Legacy behavior of binfmt_misc is to pass the full path
> +            vector for this purpose, thus preserving the original ``argv[0]``.
> +            e.g. If your interp is set to ``/bin/foo`` and you run ``blah``
> +            (which is in ``/usr/local/bin``), then the kernel will execute
> +            ``/bin/foo`` with ``argv[]`` set to ``["/bin/foo", "/usr/local/bin/blah", "blah"]``.  The interp has to be aware of this so it can

* same here, blank line after definition list item is more readable.
* The last line is to long.

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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux