Bug 2172516 - libnbd and nbdkit line length cleanups
Summary: libnbd and nbdkit line length cleanups
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: nbdkit
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Laszlo Ersek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-22 12:07 UTC by Laszlo Ersek
Modified: 2023-05-15 14:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-15 14:12:18 UTC
Embargoed:


Attachments (Terms of Use)

Description Laszlo Ersek 2023-02-22 12:07:56 UTC
nbdkit commit cf2b6297646a ("common/include/unique-name.h: Rename UNIQUE_NAME macro", 2022-01-11) and libnbd in commit 485f5ddf2d48
("common/include/unique-name.h: Rename UNIQUE_NAME macro", 2022-02-23) have made some lines overlong (>80 chars). On top, libnbd commit b5101fbc59cb ("use space consistently in function and function-like macro invocations", 2023-02-22) made some lines even longer.

Rewrap the libnbd source code (primarily in the files modified by the above-noted commits) with an 80 characters line length. Mirror the result back to nbdkit.

Comment 1 Laszlo Ersek 2023-02-22 12:11:46 UTC
Unless it complicates the libnbd generator too much, stay within the 80 characters line width in the generated *.[ch] files as well.

Comment 2 Laszlo Ersek 2023-02-22 12:19:14 UTC
Related threads:

[Libguestfs] [libnbd PATCH v3 01/29] use space consistently in function and function-like macro invocations
https://listman.redhat.com/archives/libguestfs/2023-February/030685.html

[Libguestfs] [libnbd PATCH v3 02/29] generator/C.ml: use space consistently in func. and func.-like macro calls
https://listman.redhat.com/archives/libguestfs/2023-February/030683.html

Comment 3 Richard W.M. Jones 2023-02-22 13:33:04 UTC
(In reply to Laszlo Ersek from comment #1)
> Unless it complicates the libnbd generator too much, stay within the 80
> characters line width in the generated *.[ch] files as well.

The generator should always attempt to produce readable code,
as if it had been written by hand (except obviously more
consistent and correct).  It should be possible to go through
generated code with a debugger and understand what's going on.
There are even some generated comments.

To this end there are various functions in the generator for
creating nicely line-wrapped code.

Comment 4 Laszlo Ersek 2023-04-13 14:04:18 UTC
[nbdkit PATCH 00/17] wrap source code at 80 chars
Message-Id: <20230413140346.908687-1-lersek>
https://listman.redhat.com/archives/libguestfs/2023-April/031226.html

Comment 5 Laszlo Ersek 2023-04-13 18:05:02 UTC
(In reply to Laszlo Ersek from comment #4)
> [nbdkit PATCH 00/17] wrap source code at 80 chars
> Message-Id: <20230413140346.908687-1-lersek>
> https://listman.redhat.com/archives/libguestfs/2023-April/031226.html

Commit range a7709a69ac08..64f7c65cfc4c.

Comment 6 Laszlo Ersek 2023-04-14 08:00:50 UTC
[libnbd PATCH 0/4] copy: wrap source code at 80 characters
Message-Id: <20230414075956.240682-1-lersek>
https://listman.redhat.com/archives/libguestfs/2023-April/031258.html

Comment 7 Laszlo Ersek 2023-04-14 10:06:04 UTC
[libnbd PATCH v2 0/3] copy: wrap source code at 80 characters
Message-Id: <20230414100534.377169-1-lersek>
https://listman.redhat.com/archives/libguestfs/2023-April/031270.html

Comment 8 Laszlo Ersek 2023-04-14 10:35:33 UTC
(In reply to Laszlo Ersek from comment #7)
> [libnbd PATCH v2 0/3] copy: wrap source code at 80 characters
> Message-Id: <20230414100534.377169-1-lersek>
> https://listman.redhat.com/archives/libguestfs/2023-April/031270.html

Commit range 30d8e6414bde..424420a55bab.

Comment 9 Laszlo Ersek 2023-04-18 17:27:37 UTC
[libnbd PATCH 00/18] wrap hand-written source code at 80 characters
Message-Id: <20230418172631.485472-1-lersek>
(no link in the archive just yet)

Comment 10 Laszlo Ersek 2023-04-19 15:20:04 UTC
(In reply to Laszlo Ersek from comment #9)
> [libnbd PATCH 00/18] wrap hand-written source code at 80 characters
> Message-Id: <20230418172631.485472-1-lersek>
> (no link in the archive just yet)

Patches 01..15 and 17..18 merged as commit range 1acdeec1a248..a458f0644de0.

Comment 11 Laszlo Ersek 2023-04-19 15:32:14 UTC
[libnbd PATCH v2] tests/requires: wrap source code at 80 characters
Message-Id: <20230419153127.178015-1-lersek>

Comment 12 Laszlo Ersek 2023-04-20 08:42:43 UTC
(In reply to Laszlo Ersek from comment #11)
> [libnbd PATCH v2] tests/requires: wrap source code at 80 characters
> Message-Id: <20230419153127.178015-1-lersek>

Commit 86820dbab497.

Comment 13 Laszlo Ersek 2023-04-20 14:05:18 UTC
[libnbd PATCH 0/3] start wrapping generated C source code harder at 80 chars
Message-Id: <20230420140458.247274-1-lersek>

Comment 14 Laszlo Ersek 2023-04-21 07:34:41 UTC
[libnbd PATCH v2 0/4] start wrapping generated C source code harder at 80 chars
Message-Id: <20230421073418.146910-1-lersek>

Comment 15 Laszlo Ersek 2023-04-21 13:04:57 UTC
(In reply to Laszlo Ersek from comment #14)
> [libnbd PATCH v2 0/4] start wrapping generated C source code harder at 80 chars
> Message-Id: <20230421073418.146910-1-lersek>

Commit range 86820dbab497..0744f748ed90.

Comment 16 Laszlo Ersek 2023-04-25 07:11:36 UTC
[libnbd PATCH 00/23] continue wrapping generated C code harder
Message-Id: <20230425071108.82663-1-lersek>
https://listman.redhat.com/archives/libguestfs/2023-April/031375.html

Comment 17 Laszlo Ersek 2023-05-02 16:34:59 UTC
(In reply to Laszlo Ersek from comment #16)
> [libnbd PATCH 00/23] continue wrapping generated C code harder
> Message-Id: <20230425071108.82663-1-lersek>
> https://listman.redhat.com/archives/libguestfs/2023-April/031375.html

The first 21 patches have been pushed as 0744f748ed90..2fa6198f61d4; the last two patches need a v2.

Comment 18 Laszlo Ersek 2023-05-02 17:05:00 UTC
[libnbd PATCH v2 0/2] continue wrapping generated C code harder
Message-Id: <20230502170426.166550-1-lersek>
https://listman.redhat.com/archives/libguestfs/2023-May/031427.html

Comment 19 Laszlo Ersek 2023-05-04 12:42:06 UTC
(In reply to Laszlo Ersek from comment #18)
> [libnbd PATCH v2 0/2] continue wrapping generated C code harder
> Message-Id: <20230502170426.166550-1-lersek>
> https://listman.redhat.com/archives/libguestfs/2023-May/031427.html

Commit range 2fa6198f61d4..99d18799f407.

Comment 20 Laszlo Ersek 2023-05-10 11:49:38 UTC
[libnbd PATCH 0/6] finish wrapping generated C code harder
Message-Id: <20230510114814.458531-1-lersek>
https://listman.redhat.com/archives/libguestfs/2023-May/031480.html

Comment 21 Laszlo Ersek 2023-05-15 14:12:18 UTC
(In reply to Laszlo Ersek from comment #20)
> [libnbd PATCH 0/6] finish wrapping generated C code harder
> Message-Id: <20230510114814.458531-1-lersek>
> https://listman.redhat.com/archives/libguestfs/2023-May/031480.html

Merged as commit range d2d214c4e161..96fdc62ad59d.


Note You need to log in before you can comment on or make changes to this bug.