Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Oct 2021 15:02:31 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        "Bjoern A. Zeeb" <bz@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 548ada00e54a - main - LinuxKPI: add bcd.h
Message-ID:  <832a2403091df094d6f7ab471aef0694adebb939.camel@freebsd.org>
In-Reply-To: <202110252023.19PKNSRO031788@gitrepo.freebsd.org>
References:  <202110252023.19PKNSRO031788@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2021-10-25 at 20:23 +0000, Bjoern A. Zeeb wrote:
> The branch main has been updated by bz:
> 
> URL:
> https://cgit.FreeBSD.org/src/commit/?id=548ada00e54a9e7745d041b1ec7f68f3bd493365
> 
> commit 548ada00e54a9e7745d041b1ec7f68f3bd493365
> Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
> AuthorDate: 2021-10-25 18:14:08 +0000
> Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
> CommitDate: 2021-10-25 20:20:53 +0000
> 
>     LinuxKPI: add bcd.h
>     
>     Add bcd2bin() as linuxkpi_bcd2bin().  Libkern does provide a
> bcd2bin()
> 
> [...]
> + * We could use libkern, but we need the argument truncating.
> + *


What does that mean, "we need the argument truncating"?

It looks to me like the only functional difference between the linux
implementation and ours is that for invalid bcd data (nybble values in
the range 0xA - 0xF) the linux version returns a crazy result and our
lookup table returns 0.  I doubt our code relies on that.

-- Ian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?832a2403091df094d6f7ab471aef0694adebb939.camel>