[Libguestfs] [libnbd PATCH 00/18] wrap hand-written source code at 80 characters

Laszlo Ersek lersek at redhat.com
Tue Apr 18 17:26:13 UTC 2023


Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516

This series wraps the non-generated C-language source code (*.c and *.h
files) at 80 characters.

"ocaml/helpers.c" remains overlong, but I couldn't find a way to wrap
it: its single overlong line contains the comment

  /* For how we're getting the exception name, see:
   * https://github.com/libguestfs/libguestfs/blob/5d94be2583d557cfc7f8a8cfee7988abfa45a3f8/daemon/daemon-c.c#L40
   */

and even if I truncate the blob hash to 12 nibbles, the line remains too
long.

The following files are also too wide:

  include/libnbd.h
  lib/api.c
  lib/states-run.c
  lib/states.c
  lib/states.h
  lib/unlocked.h
  ocaml/nbd-c.c
  python/libnbdmod.c
  python/methods.h

but they are all generated; we'll have to discuss them separately.

Laszlo

Laszlo Ersek (18):
  examples/copy-libev: wrap source code at 80 characters
  examples/glib-main-loop: wrap source code at 80 characters
  examples/strict-structured-reads: wrap source code at 80 characters
  fuse/nbdfuse: wrap source code at 80 characters
  generator/states: wrap source code at 80 characters
  interop/{dirty-bitmap,structured-read}: wrap the source code at 80
    chars
  interop/interop: wrap source code at 80 characters
  lib/internal.h: wrap source code at 80 characters
  lib/opt: wrap source code at 80 characters
  python/handle: wrap source code at 80 characters
  tests/closure-lifetimes: wrap source code at 80 characters
  tests/connect-uri: wrap source code at 80 characters
  tests/meta-base-allocation: wrap source code at 80 characters
  tests/newstyle-limited: wrap source code at 80 characters
  tests/oldstyle: wrap source code at 80 characters
  tests/requires: wrap source code at 80 characters
  ublk/nbdublk: wrap source code at 80 characters
  ublk/tgt: wrap source code at 80 characters

 examples/copy-libev.c              |  8 ++--
 examples/glib-main-loop.c          |  6 ++-
 examples/strict-structured-reads.c | 11 +++--
 fuse/nbdfuse.c                     |  4 +-
 generator/states-magic.c           |  3 +-
 generator/states-newstyle-opt-go.c | 12 +++--
 interop/dirty-bitmap.c             | 12 ++---
 interop/interop.c                  |  3 +-
 interop/structured-read.c          | 15 +++----
 lib/internal.h                     |  7 ++-
 lib/opt.c                          |  8 ++--
 python/handle.c                    |  4 +-
 tests/closure-lifetimes.c          | 47 ++++++++------------
 tests/connect-uri.c                |  3 +-
 tests/meta-base-allocation.c       | 13 +++---
 tests/newstyle-limited.c           |  8 ++--
 tests/oldstyle.c                   |  8 ++--
 tests/requires.c                   | 16 ++++++-
 ublk/nbdublk.c                     |  4 +-
 ublk/tgt.c                         |  6 ++-
 20 files changed, 106 insertions(+), 92 deletions(-)


base-commit: 424420a55bab1a8ec9acffe684e0bbd0dc4ec45d


More information about the Libguestfs mailing list