[Toybox] [PATCH] lsof: explicit size for device major:minor buffer.
enh
enh at google.com
Mon Sep 27 10:19:06 PDT 2021
ah, yeah, seq_put_hex_ll() takes a _minimum_ field width.
new patch attached that fixes that and adds a comment making the origin of
the 10 clearer. (both patches "work for me" since i don't actually have any
non-8-bit devices :-( )
On Sun, Sep 26, 2021 at 1:14 PM Rob Landley <rob at landley.net> wrote:
> On 9/25/21 8:55 PM, enh via Toybox wrote:
> > These are 2 hex digits each with a ':' between them in the kernel.
>
> Major has been 12 bits and minor 20 bits since 2003. (Git annotate on the
> header
> says https://github.com/mpe/linux-fullhistory/commit/7ae6a13832a2 .)
>
> So xxx:xxxxx, which is why I used a 10 byte buffer.
>
> Rob
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210927/86d08b12/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lsof-explicit-size-for-device-major-minor-buffer.patch
Type: text/x-patch
Size: 1492 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210927/86d08b12/attachment-0002.bin>
More information about the Toybox
mailing list