Laszlo Ersek
2023-Apr-18 17:26 UTC
[Libguestfs] [libnbd PATCH 05/18] generator/states: wrap source code at 80 characters
Rewrap some error messages to keep the source code width at most 80 chars. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516 Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- generator/states-magic.c | 3 ++- generator/states-newstyle-opt-go.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/generator/states-magic.c b/generator/states-magic.c index b06057b5acd8..7928959ff86c 100644 --- a/generator/states-magic.c +++ b/generator/states-magic.c @@ -53,7 +53,8 @@ MAGIC.CHECK_MAGIC: } else { SET_NEXT_STATE (%.DEAD); - set_error (0, "handshake: server is not either an oldstyle or fixed newstyle NBD server"); + set_error (0, "handshake: server is not either an oldstyle or fixed " + "newstyle NBD server"); return 0; } return 0; diff --git a/generator/states-newstyle-opt-go.c b/generator/states-newstyle-opt-go.c index ffd7233985d6..2ef440d43095 100644 --- a/generator/states-newstyle-opt-go.c +++ b/generator/states-newstyle-opt-go.c @@ -163,7 +163,8 @@ NEWSTYLE.OPT_GO.CHECK_REPLY: case NBD_INFO_EXPORT: if (len != sizeof h->sbuf.or.payload.export) { SET_NEXT_STATE (%.DEAD); - set_error (0, "handshake: incorrect NBD_INFO_EXPORT option reply length"); + set_error (0, "handshake: incorrect NBD_INFO_EXPORT option reply " + "length"); return 0; } exportsize = be64toh (h->sbuf.or.payload.export.exportsize); @@ -176,7 +177,8 @@ NEWSTYLE.OPT_GO.CHECK_REPLY: case NBD_INFO_BLOCK_SIZE: if (len != sizeof h->sbuf.or.payload.block_size) { SET_NEXT_STATE (%.DEAD); - set_error (0, "handshake: incorrect NBD_INFO_BLOCK_SIZE option reply length"); + set_error (0, "handshake: incorrect NBD_INFO_BLOCK_SIZE option " + "reply length"); return 0; } min = be32toh (h->sbuf.or.payload.block_size.minimum); @@ -191,7 +193,8 @@ NEWSTYLE.OPT_GO.CHECK_REPLY: if (len > sizeof h->sbuf.or.payload.name_desc.info + NBD_MAX_STRING || len < sizeof h->sbuf.or.payload.name_desc.info) { SET_NEXT_STATE (%.DEAD); - set_error (0, "handshake: incorrect NBD_INFO_NAME option reply length"); + set_error (0, "handshake: incorrect NBD_INFO_NAME option reply " + "length"); return 0; } free (h->canonical_name); @@ -206,7 +209,8 @@ NEWSTYLE.OPT_GO.CHECK_REPLY: if (len > sizeof h->sbuf.or.payload.name_desc.info + NBD_MAX_STRING || len < sizeof h->sbuf.or.payload.name_desc.info) { SET_NEXT_STATE (%.DEAD); - set_error (0, "handshake: incorrect NBD_INFO_DESCRIPTION option reply length"); + set_error (0, "handshake: incorrect NBD_INFO_DESCRIPTION option " + "reply length"); return 0; } free (h->description);
Eric Blake
2023-Apr-18 20:16 UTC
[Libguestfs] [libnbd PATCH 05/18] generator/states: wrap source code at 80 characters
On Tue, Apr 18, 2023 at 07:26:18PM +0200, Laszlo Ersek wrote:> Rewrap some error messages to keep the source code width at most 80 chars. > > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516 > Signed-off-by: Laszlo Ersek <lersek at redhat.com> > --- > generator/states-magic.c | 3 ++- > generator/states-newstyle-opt-go.c | 12 ++++++++---- > 2 files changed, 10 insertions(+), 5 deletions(-) > > diff --git a/generator/states-magic.c b/generator/states-magic.c > index b06057b5acd8..7928959ff86c 100644 > --- a/generator/states-magic.c > +++ b/generator/states-magic.c > @@ -53,7 +53,8 @@ MAGIC.CHECK_MAGIC: > } > else { > SET_NEXT_STATE (%.DEAD); > - set_error (0, "handshake: server is not either an oldstyle or fixed newstyle NBD server"); > + set_error (0, "handshake: server is not either an oldstyle or fixed " > + "newstyle NBD server");The term 'fixed newstyle' has enough relevance on its own in the protocol that I might wrap one word earlier to keep that phrasing together; but I'm not opposed to your patch going in as-is. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org