[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 7/7] qdev-monitor: Propagate errors through qdev
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 7/7] qdev-monitor: Propagate errors through qdev_device_add() |
Date: |
Tue, 09 Jun 2015 08:12:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 06/08/2015 12:57 PM, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> include/monitor/qdev.h | 2 +-
>> qdev-monitor.c | 36 +++++++++++++++---------------------
>> vl.c | 7 +++++--
>> 3 files changed, 21 insertions(+), 24 deletions(-)
>>
>
>> if (!object_dynamic_cast(OBJECT(bus), dc->bus_type)) {
>> - qerror_report(ERROR_CLASS_GENERIC_ERROR,
>> - "Device '%s' can't go on a %s bus",
>> - driver, object_get_typename(OBJECT(bus)));
>> + error_setg(errp, "Device '%s' can't go on a %s bus",
>> + driver, object_get_typename(OBJECT(bus)));
>
> Pre-existing - "a '%s' bus" or "an %s bus" might look a bit nicer than
> "a %s bus" for some bus names (depends on the initial sound during
> pronunciation). Certainly a nightmare for translation rules to other
> languages that don't follow English rules on indefinite article usage.
For a real nightmare, try following every other language's rules[*].
Not following English rules will feel like a lullaby after that.
> Maybe some word-smithing can avoid the indefinite article altogether?
Do you think "Device '%s' can't go on %s bus" would be an improvement?
> But not something I care about enough to hold up the series.
>
> Reviewed-by: Eric Blake <address@hidden>
Thanks!
[*]
http://search.cpan.org/dist/Locale-Maketext/lib/Locale/Maketext/TPJ13.pod?#A_Localization_Horror_Story:_It_Could_Happen_To_You
- Re: [Qemu-devel] [PATCH 4/7] qdev-monitor: Fix check for full bus, (continued)