GNU bug report logs -
#37750
inputattach: Add baud rate option
Previous Next
Full log
Message #13 received at 37750-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Tim,
Tim Gesthuizen <tim.gesthuizen <at> yahoo.de> skribis:
>>From 544ae60c79134be980d6ee0430deb6abe4cad8ca Mon Sep 17 00:00:00 2001
> From: Tim Gesthuizen <tim.gesthuizen <at> yahoo.de>
> 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.
Neat. I took the liberty to apply it with the minor change below (we
don’t usually call ‘error’; eventually I think we should use contracts à
la Racket in such situations.)
Thanks!
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 20e89c0dea..08acb79ed6 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1037,9 +1037,7 @@ as expected.")))
(match-lambda
(($ <inputattach-configuration> 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 "--baud-rate" (number->string baud-rate))
'())
(list (string-append "--" type)
device))))
This bug report was last modified 5 years and 213 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.