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

Re: [Xen-devel] [v7][RFC][PATCH 04/13] hvmloader/util: get reserved device memory maps



>>> On 27.10.14 at 04:12, <tiejun.chen@xxxxxxxxx> wrote:
> On 2014/10/24 22:22, Jan Beulich wrote:
>>>>> On 24.10.14 at 09:34, <tiejun.chen@xxxxxxxxx> wrote:
>>> --- a/tools/firmware/hvmloader/util.h
>>> +++ b/tools/firmware/hvmloader/util.h
>>> @@ -241,6 +241,12 @@ int build_e820_table(struct e820entry *e820,
>>>                        unsigned int bios_image_base);
>>>   void dump_e820_table(struct e820entry *e820, unsigned int nr);
>>>
>>> +#include <xen/memory.h>
>>> +#define ENOBUFS     105 /* No buffer space available */
>>
>> This is a joke I hope? The #include belongs at the top (albeit afaict
>> you don't really need it here), and the #define is completely
> 
> If without this line, #include <xen/memory.h>,
> 
> In file included from build.c:25:0:
> ../util.h:246:70: error: array type has incomplete element type
>   int get_reserved_device_memory_map(struct xen_reserved_device_memory 
> entries[],
>                                                                        ^
> make[8]: *** [build.o] Error 1

So just forward declare the structure ahead of the function
declaration.

>> misplaced here. While I generally wouldn't recommend doing this, I
>> think in the case here including the hypervisor header that defines
>> them would be okay. Perhaps not via relative path, but via having
> 
> Seems we just need to include this,
> 
> #include <errno.h>

You shouldn't include system headers here - what if the build system's
-E... values differ from Xen's? Please remember that what your making
changes to is not arbitrary application code.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.