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

Re: [libvirt] [PATCH v1 1/3] libvirt: Add one file cpu_ppc_data.h to define CPU data for PPC



On 12.10.2012 09:31, Li Zhang wrote:
> On Thu, Oct 11, 2012 at 11:12 PM, Michal Privoznik <mprivozn redhat com> wrote:
>> On 09.10.2012 09:58, Li Zhang wrote:
>>> CPU version can be got by PVR on PowerPC. So this PVR is defined in
>>> the CPU data in cpuData structure.
>>>
>>> Signed-off-by: Li Zhang <zhlcindy linux vnet ibm com>
>>> ---
>>>  src/cpu/cpu.h          |    3 +++
>>>  src/cpu/cpu_ppc_data.h |   33 +++++++++++++++++++++++++++++++++
>>>  2 files changed, 36 insertions(+), 0 deletions(-)
>>>  create mode 100644 src/cpu/cpu_ppc_data.h
>>>
>>> diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h
>>> index 5ba742d..01c732c 100644
>>> --- a/src/cpu/cpu.h
>>> +++ b/src/cpu/cpu.h
>>> @@ -28,11 +28,14 @@
>>>  # include "datatypes.h"
>>>  # include "conf/cpu_conf.h"
>>>  # include "cpu_x86_data.h"
>>> +# include "cpu_ppc_data.h"
>>>
>>>
>>>  union cpuData {
>>>      struct cpuX86Data x86;
>>>      /* generic driver needs no data */
>>> +    /* PowerPC driver need data*/
>>> +    struct cpuPPCData ppc;
>>>  };
>>>
>>>
>>> diff --git a/src/cpu/cpu_ppc_data.h b/src/cpu/cpu_ppc_data.h
>>> new file mode 100644
>>> index 0000000..37199f7
>>> --- /dev/null
>>> +++ b/src/cpu/cpu_ppc_data.h
>>> @@ -0,0 +1,33 @@
>>> +/*
>>> + * cpu_ppc_data.h: PowerPC specific CPU data
>>> + *
>>> + * Copyright (C) 2012 IBM Corporation.
>>> + *
>>> + * This library is free software; you can redistribute it and/or
>>> + * modify it under the terms of the GNU Lesser General Public
>>> + * License as published by the Free Software Foundation; either
>>> + * version 2.1 of the License, or (at your option) any later version.
>>> + *
>>> + * This library is distributed in the hope that it will be useful,
>>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>>> + * Lesser General Public License for more details.
>>> + *
>>> + * You should have received a copy of the GNU Lesser General Public
>>> + * License along with this library;  If not, see
>>> + * <http://www.gnu.org/licenses/>.
>>> + *
>>> + * Authors:
>>> + *      Li Zhang <zhlcindy linux vnet ibm com>
>>> + */
>>> +
>>> +#ifndef __VIR_CPU_PPC_DATA_H__
>>> +#define __VIR_CPU_PPC_DATA_H__
>>
>> s/#define/# define/
>>
>>> +
>>> +#include <stdint.h>
>>
>> s/#include/# include/
>>
> Thanks for your comments, Michal.
> 
> This is the coding style in libvirt,right?
> I didn't use space before. :-)

Yeah. You can find the whole set of rules online:

  http://libvirt.org/hacking.html

Michal


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