Re: [PATCH 1/6] Introduce a set of APIs for managing architectures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/11/2012 07:53 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> Introduce a 'virArch' enum for CPU architectures. Include
> data type providing wordsize and endianness, and APIs to
> query this info and convert to/from enum and string form.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
> +/**
> + * virArchFromString:
> + * @archstr: the CPU architecture string
> + *
> + * Return the architecture matching @archstr,
> + * defaulting to VIR_ARCH_I686 if unidentified

Really?

> + */
> +virArch virArchFromString(const char *archstr)
> +{
> +    size_t i;
> +    for (i = 1 ; i < VIR_ARCH_LAST ; i++) {
> +        if (STREQ(virArchData[i].name, archstr))
> +            return i;
> +    }
> +
> +    VIR_DEBUG("Unknown arch %s", archstr);
> +    return VIR_ARCH_NONE;

Looks like you return NONE instead.

Other than the mixed-up comment, looks good to go after 1.0.1.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]