[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/7] smbios: Make multiple -smbios type= accu
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/7] smbios: Make multiple -smbios type= accumulate sanely |
Date: |
Sat, 17 Aug 2013 06:48:25 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
On 08/16/2013 07:18 AM, address@hidden wrote:
> From: Markus Armbruster <address@hidden>
>
> Currently, -smbios type=T,NAME=VAL,... adds one field (T,NAME) with
> value VAL to fw_cfg for each unique NAME. If NAME occurs multiple
> times, the last one's VAL is used (before the QemuOpts conversion, the
> first one was used).
>
> +
> + val = qemu_opt_get(opts, "release");
> + if (val) {
> + if (sscanf(val, "%hhu.%hhu", &type0.major, &type0.minor) !=
> 2) {
> + error_report("Invalid release");
As in v1, I'm not a fan of using sscanf for integer parsing (it has
undefined behavior if the user provides a value that overflows the
destination type); but as this is code motion, it does not invalidate my
review.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 0/7] smbios cleanup & nicer defaults for type 1, armbru, 2013/08/16
- [Qemu-devel] [PATCH v2 3/7] smbios: Improve diagnostics for conflicting entries, armbru, 2013/08/16
- [Qemu-devel] [PATCH v2 1/7] smbios: Normalize smbios_entry_add()'s error handling to exit(1), armbru, 2013/08/16
- [Qemu-devel] [PATCH v2 2/7] smbios: Convert to QemuOpts, armbru, 2013/08/16
- [Qemu-devel] [PATCH v2 4/7] smbios: Make multiple -smbios type= accumulate sanely, armbru, 2013/08/16
- Re: [Qemu-devel] [PATCH v2 4/7] smbios: Make multiple -smbios type= accumulate sanely,
Eric Blake <=
- [Qemu-devel] [PATCH v2 6/7] vl: Set current_machine early, armbru, 2013/08/16
[Qemu-devel] [PATCH v2 5/7] smbios: Factor out smbios_maybe_add_str(), armbru, 2013/08/16
[Qemu-devel] [PATCH v2 7/7] smbios: Set system manufacturer, product & version by default, armbru, 2013/08/16