From patchwork Mon Oct 14 17:57:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 15738 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 04057175A0; Mon, 14 Oct 2019 19:18:36 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id B440E17594 for ; Mon, 14 Oct 2019 19:18:35 +0100 (BST) Received: from localhost ([::1]:55264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iK4vT-0000Rh-37 for patchwork@mira.cbaines.net; Mon, 14 Oct 2019 14:18:35 -0400 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 X-Loop: help-debbugs@gnu.org Subject: [bug#37750] Fixup: Documentation References: <87d0ezb5g1.fsf@yahoo.de> In-Reply-To: <87d0ezb5g1.fsf@yahoo.de> Resent-From: Tim Gesthuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Oct 2019 17:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 37750@debbugs.gnu.org Received: via spool by 37750-submit@debbugs.gnu.org id=B37750.157107586816079 (code B ref 37750); Mon, 14 Oct 2019 17:58:01 +0000 Received: (at 37750) by debbugs.gnu.org; 14 Oct 2019 17:57:48 +0000 Received: from localhost ([127.0.0.1]:41661 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iK4bL-0004BE-Sb for submit@debbugs.gnu.org; Mon, 14 Oct 2019 13:57:48 -0400 Received: from sonic302-21.consmr.mail.ir2.yahoo.com ([87.248.110.84]:37922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iK4bH-0004Ar-68 for 37750@debbugs.gnu.org; Mon, 14 Oct 2019 13:57:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1571075855; bh=Nv8czOM5qr6hUofnNwwMUNO6Yc9o98qellc4a9Jom0A=; h=From:To:Subject:Date:From:Subject; b=jZ68d9iss90oBW1GU41ShvU/4jV3q1Z/ynxRKa25AzElzR/um7HROV17ZS56PEDjqh083eVUwJ1Cvemd/I9Wtgz48d3SUyUGvxqHdZBA6olb6lEkiRfPg9CiwiTvrRuaZEZXS2YgLP7dFladqrPYSVUL1k6N2E4/wedgrzCHwGDr12hwDVCZD610LLiWOGuJjTc4CQlK/xEt2kPdVw+v+iz+f83a3w30l1Cz2k1mYdFvygQfg2aSPkIyM7AIlw6+QaJ4QMcX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plbAXMR3wnSQicib51igFlcTPfLzEmp6hAPGGdRjUJJAVS1RqRfFK6c9l4xBBQvDR0jgZacslJUc RHxcZcnF0tvCN4WkUVobnzu6y3m5eVZ2fIYOjjksxETBetxQAfhnw3entW5hZaeeUdno1MeMqekF 1_h9fRA6sKdVfg5IKcYMtB.1PLMqUxiRUeNrTQsKysTsFyTu_Ldj6LxV_qpVwZxvTJqrzUH.aayk T.vPaIMVM8dx5zCCj.g6YaH4I2L9eJUBDxJZSl..TqDgleHaBmVBs6MmRmnf.8eHC58cbySFprYm 6KG5m90YyEQI38S8tTycC637DgNB.O4GzbBhozWwJbbpa0E26alwCYHo- Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ir2.yahoo.com with HTTP; Mon, 14 Oct 2019 17:57:35 +0000 Received: by smtp412.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID c79c9e08e4aedc257d80304138496653; Mon, 14 Oct 2019 17:57:30 +0000 (UTC) User-agent: mu4e 1.2.0; emacs 26.3 Date: Mon, 14 Oct 2019 19:57:29 +0200 Message-ID: <87blujb46u.fsf@yahoo.de> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Tim Gesthuizen via Guix-patches X-Patchwork-Original-From: Tim Gesthuizen via Guix-patches via From: "ashish.is--- via Guix-patches\" via" X-getmail-retrieved-from-mailbox: Patches 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. 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