From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:53150) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK4bc-000390-B7 for guix-patches@gnu.org; Mon, 14 Oct 2019 13:58:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iK4bb-00087o-37 for guix-patches@gnu.org; Mon, 14 Oct 2019 13:58:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32840) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iK4ba-00087N-Jc for guix-patches@gnu.org; Mon, 14 Oct 2019 13:58:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iK4bZ-0004Bk-Pe for guix-patches@gnu.org; Mon, 14 Oct 2019 13:58:02 -0400 Subject: [bug#37750] Fixup: Documentation References: <87d0ezb5g1.fsf@yahoo.de> In-Reply-To: <87d0ezb5g1.fsf@yahoo.de> Resent-Message-ID: Date: Mon, 14 Oct 2019 19:57:29 +0200 Message-ID: <87blujb46u.fsf@yahoo.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" Reply-to: Tim Gesthuizen via Guix-patches From: Tim Gesthuizen via Guix-patches via To: 37750@debbugs.gnu.org --=-=-= Content-Type: text/plain Of course there is also documentation for the new parameter which I missed to send. You find an updated patch attached. Sorry for the hassle, Tim. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-Add-baud-rate-parameter-to-inputattach-service.patch >From 544ae60c79134be980d6ee0430deb6abe4cad8ca Mon Sep 17 00:00:00 2001 From: Tim Gesthuizen Date: Thu, 10 Oct 2019 18:38:36 +0200 Subject: [PATCH] gnu: Add baud-rate parameter to inputattach-service * gnu/services/desktop.scm (inputattach-configuration): Add baud-rate field. (inputattach-shepherd-service): Add baud-rate to parameters when specified. * doc/guix.texi (Miscellaneous Services): [inputattach Service] Document baud-rate parameter. --- doc/guix.texi | 4 ++++ gnu/services/desktop.scm | 32 ++++++++++++++++++++------------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6703c2756c..e53a708df2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -24549,6 +24549,10 @@ The type of device to connect to. Run @command{inputattach --help}, from the @item @code{device} (default: @code{"/dev/ttyS0"}) The device file to connect to the device. +@item @code{baud-rate} (default: @code{#f}) +Baud rate to use for the serial connection. +Should be a number or @code{#f}. + @item @code{log-file} (default: @code{#f}) If true, this must be the name of a file to log messages to. @end table diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index a32756e040..35320bdde2 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1021,23 +1021,31 @@ as expected."))) (default "wacom")) (device inputattach-configuration-device (default "/dev/ttyS0")) + (baud-rate inputattach-configuration-baud-rate + (default #f)) (log-file inputattach-configuration-log-file (default #f))) (define inputattach-shepherd-service (match-lambda - (($ type device log-file) - (list (shepherd-service - (provision '(inputattach)) - (requirement '(udev)) - (documentation "inputattach daemon") - (start #~(make-forkexec-constructor - (list (string-append #$inputattach - "/bin/inputattach") - (string-append "--" #$type) - #$device) - #:log-file #$log-file)) - (stop #~(make-kill-destructor))))))) + (($ type device baud-rate log-file) + (let ((args (append (if baud-rate + (if (number? baud-rate) + (list "--baud-rate" (number->string baud-rate)) + (error "Expected baud-rate to be a number or #f" baud-rate)) + '()) + (list (string-append "--" type) + device)))) + (list (shepherd-service + (provision '(inputattach)) + (requirement '(udev)) + (documentation "inputattach daemon") + (start #~(make-forkexec-constructor + (cons (string-append #$inputattach + "/bin/inputattach") + (quote #$args)) + #:log-file #$log-file)) + (stop #~(make-kill-destructor)))))))) (define inputattach-service-type (service-type -- 2.23.0 --=-=-=--