Hi David, > -----Original Message----- > From: David Bauer [mailto:[email protected]] > Sent: Mittwoch, 4. September 2019 23:07 > To: [email protected] > Cc: [email protected] > Subject: Re: [OpenWrt-Devel] [PATCH] base-files: fix get_mac_address not > accepting hex offsets > > Hello Adrian, > > On 9/4/19 10:08 PM, [email protected] wrote: > > when I tested it then, the hexdump offset did accept hexadecimal values > > intrinsically. > > I remember that because I was quite surprised that offset accepted > > hexadecimal values and size didn't. > > This might be the case for hexdump, however dd does not accept hexadecimal > values.
Indeed, I overlooked that one. So we have four cases: 1. mtd_get_mac_text: This uses dd and should currently be broken, so it needs the $(($...)) as a fix. 2. get_mac_binary: This one uses hexdump, so $(($...)) is not required, but might be added for convenience. 3. mtd_get_mac_binary: This one is just calling get_mac_binary. I'd say that get_mac_binary should be safe to be called with hex offset, so I would not change to decimal _before_, so just keep this as it is. 4. mtd_get_mac_binary_ubi: This could be treated similar to 2. However, on a closer look part of this function is the same as in get_mac_binary. So, IMO this one should be refactored to call get_mac_binary as in mtd_get_mac_binary. Nevertheless, thanks for spotting and repairing the bug introduced in my patch! Best Adrian > > The commit message is indeed not correct in that regard. However I've changed > the > evaluation there too, as originally it was provided decimal numbers, keeping > the > underlying call stable. > > Best wishes > David
openpgp-digital-signature.asc
Description: PGP signature
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
