From a8769ef12d7e223e33fc47bed03fba2bfa2f3536 Mon Sep 17 00:00:00 2001 From: Marcus Sundberg Date: Sat, 26 Mar 2016 20:11:43 +0100 Subject: [PATCH] evbuffer_add: Use last_with_datap if set, not last. evbuffer_add() would always put data in the last chain, even if there was available space in a previous chain, and in doing so it also failed to update last_with_datap, causing subsequent calls to other functions that do look at last_with_datap to add data in the middle of the evbuffer instead of at the end. Fixes the evbuffer_add() part of issue #335, and the evbuffer/add2 and evbuffer/add3 tests, and also prevents wasting space available in the chain pointed to by last_with_datap. --- buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buffer.c b/buffer.c index 7cca0e8a..f378b731 100644 --- a/buffer.c +++ b/buffer.c @@ -1732,7 +1732,11 @@ evbuffer_add(struct evbuffer *buf, const void *data_in, size_t datlen) goto done; } - chain = buf->last; + if (*buf->last_with_datap == NULL) { + chain = buf->last; + } else { + chain = *buf->last_with_datap; + } /* If there are no chains allocated for this buffer, allocate one * big enough to hold all the data. */ -- 2.12.0 9319c8e9d'>treecommitdiff
path: root/gnu/installer/user.scm
AgeCommit message (Expand)Author
2022-09-22installer: Move <secret> to utils and use it for crypt passwords....* gnu/installer/user.scm (<secret>, secret?, make-secret, secret-content): Move to utils.scm. * gnu/installer/utils.scm (<secret>, secret?, make-secret, secret-content): Moved from user.scm. * gnu/installer/newt/partition.scm (prompt-luks-passwords): Make password a <secret>. * gnu/installer/parted.scm (luks-format-and-open): Unwrap secret. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Josselin Poiret
2022-08-08installer: Add comments and vertical space to the generated config....* gnu/installer/parted.scm (user-partitions->configuration): Introduce vertical space and a comment. * gnu/installer/services.scm (G_): New macro. (%system-services): Add comment for OpenSSH. (system-services->configuration): Add vertical space and comments. * gnu/installer/user.scm (users->configuration): Add comment. * gnu/installer/steps.scm (format-configuration): Add comment. (configuration->file): Expound leading comment. Pass #:format-comment to 'pretty-print-with-comments/splice'. Ludovic Courtès