qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH 2/4] hw/block/fdc: Declare shared prototypes in fdc-internal.


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 2/4] hw/block/fdc: Declare shared prototypes in fdc-internal.h
Date: Tue, 27 Apr 2021 19:56:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 4/27/21 6:53 PM, John Snow wrote:
> On 4/15/21 6:23 AM, Philippe Mathieu-Daudé wrote:
>> We want to extract ISA/SysBus code from the generic fdc.c file.
>> First, declare the prototypes we will access from the new units
>> into a new local header: "fdc-internal.h".
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>   hw/block/fdc-internal.h | 155 ++++++++++++++++++++++++++++++++++++++++
>>   hw/block/fdc.c          | 126 +++-----------------------------
>>   MAINTAINERS             |   1 +
>>   3 files changed, 164 insertions(+), 118 deletions(-)
>>   create mode 100644 hw/block/fdc-internal.h
>>
> 
> With our policy of not including osdep.h in headers, it's hard to verify
> that this header is otherwise self-sufficient.
> 
> 
> I think the only thing it needs (not in osdep.h) happens to be MAX_FD. I
> added osdep.h just to test:
> 
> jsnow@scv ~/s/q/h/block (review)> gcc -I../../include/ -I../../bin/git
> -I/usr/lib64/glib-2.0/include -I/usr/include/glib-2.0 -c -o
> test_header.bin fdc-internal.h
> fdc-internal.h:134:19: error: ‘MAX_FD’ undeclared here (not in a function)
>   134 |     FDrive drives[MAX_FD];
>       |                   ^~~~~~
> 
> 
> Should we include the fdc header from the internal one?

Yes, good catch, will do.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]