GNU bug report logs - #52470
[PATCH] services: bluetooth: Add missing config parameters

Previous Next

Package: guix-patches;

Reported by: Demis Balbach <db <at> minikn.xyz>

Date: Mon, 13 Dec 2021 19:21:02 UTC

Severity: normal

Tags: patch

Merged with 52489, 52575

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Demis Balbach <db <at> minikn.xyz>, 52470 <at> debbugs.gnu.org
Cc: dev <at> jpoiret.xyz
Subject: [bug#52470] [PATCH] services: bluetooth: Add missing config parameters
Date: Tue, 14 Dec 2021 14:03:14 +0100
Hello,

Demis Balbach <db <at> minikn.xyz> writes:

> Hello,
>
> this patch adds all (as far as I know) missing config parameters to
> the bluetooth-service.

Nice work!

> I used that default value. However, there are other paramaters
> (everthing under `[BR]' and almost everything under `[LE]') that don't
> specify default values. They are always integers as one can see here:
>
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/btd.h#n39
>
> So I took a nonsensical value like `-1' and only printed the in
> question with the user provided line if it did not equal -1.

Since Guile isn't typed, the usual approach is to use `#f` for default
values, and then use `(if (bluetooth-configuration-inquiry-scan-window
config) ...)` for example.  Any value other than #f will be considered
as truthful for conditionals (see "(guile)Booleans").

> +   (if (not (eq? -1 (bluetooth-configuration-page-scan-type config)))
> +       (string-append
> +        "\nPageScanType = "
> +        (number->string (bluetooth-configuration-page-scan-type config))) "")

Small nitpick, I'd rather have `""`, the else part of this if syntax, on
its own line, aligned with `(string-append`.

Could you also document the `bluetooth-service-type` Scheme value in
doc/guix.texi, as well as `bluetooth-configuration`, if that's not too
much to ask?  I only see one for `bluetooth-service` right now.  I'm not
sure if all configuration values should be documented there though,
since there are a lot.

By the way, shouldn't `bluetooth-service` be deprecated, given how
simple it is to use the `-type` version?

What do others think?

Best,
Josselin Poiret




This bug report was last modified 3 years and 153 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.