all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Josselin Poiret via Guix-patches via <guix-patches@gnu.org>
To: Demis Balbach <db@minikn.xyz>, 52470@debbugs.gnu.org
Cc: dev@jpoiret.xyz
Subject: [bug#52470] [PATCH] services: bluetooth: Add missing config parameters
Date: Tue, 14 Dec 2021 14:03:14 +0100	[thread overview]
Message-ID: <87bl1jfiel.fsf@jpoiret.xyz> (raw)
In-Reply-To: <87bl1kthz3.fsf@minikn.xyz>

Hello,

Demis Balbach <db@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




  reply	other threads:[~2021-12-14 13:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13 19:20 [bug#52470] [PATCH] services: bluetooth: Add missing config parameters Demis Balbach
2021-12-13 19:36 ` Demis Balbach
2021-12-14 13:03   ` Josselin Poiret via Guix-patches via [this message]
2021-12-14 14:51     ` Demis Balbach
2021-12-14 20:50     ` Demis Balbach
2021-12-19 13:11 ` Demis Balbach
2021-12-19 13:19 ` Demis Balbach
2021-12-19 16:41 ` Demis Balbach
2022-02-05 10:22   ` Demis Balbach
2022-03-09 22:43   ` bug#52470: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bl1jfiel.fsf@jpoiret.xyz \
    --to=guix-patches@gnu.org \
    --cc=52470@debbugs.gnu.org \
    --cc=db@minikn.xyz \
    --cc=dev@jpoiret.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.