From: Mark Greer <mgreer@animalcreek.com>
To: linux-nfc@lists.01.org
Subject: [linux-nfc] Re: [PATCH] tag: Implement readout of tag UID via DBus interface
Date: Thu, 11 Mar 2021 18:21:40 -0700 [thread overview]
Message-ID: <20210312012140.GA316619@animalcreek.com> (raw)
In-Reply-To: 20210311085020.429987-1-frieder.schrempf@kontron.de
[-- Attachment #1: Type: text/plain, Size: 2002 bytes --]
On Thu, Mar 11, 2021@09:50:20AM +0100, Schrempf Frieder wrote:
> From: Frieder Schrempf <frieder.schrempf@kontron.de>
Hi Frieder.
I am supposed to be taking over neard maintenance but I have been
completely derelict in my duties. I need to refresh my brain's
cache and look@your patch in more detail. In the meantime,
I have a few minor comments below.
>
> This adds a 'Uid' property to the DBus interface for tags, which
> returns the UID of the tag as byte array.
Please add more high-level information to this commit description.
For example, what problem does it solve and how does it solve it?
Something that we can look back@in 5 years and be satisfied that
it solved a problem, that it solved the problem in reasonable way,
and that it was a change worth incorporating.
> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> ---
> src/tag.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 54 insertions(+), 3 deletions(-)
>
> diff --git a/src/tag.c b/src/tag.c
> index 9eba4ee..2039e48 100644
> --- a/src/tag.c
> +++ b/src/tag.c
> @@ -53,6 +53,7 @@ struct near_tag {
> uint8_t nfcid_len;
>
> uint8_t iso15693_dsfid;
> + uint8_t iso15693_uid_len;
> uint8_t iso15693_uid[NFC_MAX_ISO15693_UID_LEN];
>
> size_t data_length;
> @@ -168,6 +169,29 @@ static const char *type_string(struct near_tag *tag)
> return type;
> }
>
> +static const uint8_t uid_array(struct near_tag *tag, uint8_t **uid)
> +{
> + if (tag->nfcid_len) {
> + DBG("NFCID: ");
> + for(int i = 0; i < tag->nfcid_len; i++)
^^
nit: Please put a space between the 'for' and the "('.
> + DBG("%x", tag->nfcid[i]);
> +
> + *uid = tag->nfcid;
> +
> + return tag->nfcid_len;
> + } else if (tag->iso15693_uid_len) {
> + DBG("ISO-UID: ");
> + for(int i = 0; i < tag->iso15693_uid_len; i++)
^^
nit: Please put a space between the 'for' and the "('.
Thanks,
Mark
--
next reply other threads:[~2021-03-12 1:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 1:21 Mark Greer [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-03-16 8:53 [linux-nfc] Re: [PATCH] tag: Implement readout of tag UID via DBus interface Frieder Schrempf
2021-03-16 18:02 Mark Greer
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=20210312012140.GA316619@animalcreek.com \
--to=mgreer@animalcreek.com \
--cc=linux-nfc@lists.01.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).