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é <phi...@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.