qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH v3 04/32] blockdev: Move bochs prob


From: Kevin Wolf
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v3 04/32] blockdev: Move bochs probe into separate file
Date: Fri, 8 Jul 2016 11:37:54 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 07.07.2016 um 22:32 hat Colin Lord geschrieben:
> On 07/06/2016 04:24 AM, Kevin Wolf wrote:
> > Am 05.07.2016 um 22:50 hat John Snow geschrieben:
> >> So, something like:
> >>
> >> block/drivers/bochs/
> > 
> > block/bochs/ if anything. We don't have to nest deeply just because we
> > can. I don't really like new subdirectories, but when all drivers start
> > to have multiple files, it might be unavoidable.
> > 
> >> bochs.c
> >> probe.c (or bochs-probe.c)
> >>
> >> and
> >>
> >> include/block/drivers/bochs/
> >>
> >> common.h (or internal.h)
> > 
> > block/bochs/internal.h (or bochs.h)
> > 
> > Just like we already have some header files directly in block/ (e.g.
> > qcow2.h). They are internal to the block driver, so no reason to move
> > them to the global include directory.
> > 
> > Kevin
> > 
> So it sounds like what I should do is that for each driver I remove a
> probe from, I'll create a new directory underneath block/ and put the
> driver file, the probe file, and any new headers in it. eg for bochs,
> there will be a new directory block/bochs/ under which there will be
> block/bochs/bochs.c, block/bochs/bochs.h, and block/bochs/probe.c. Thus
> no new headers will end up going in the include/ directory.

Yes, either that or like Markus says, just create a block/bochs-probe.c
and block/bochs.h and leave the existing files where they are. Maybe
give us a bit more time to come to a conclusion. I could live with
either.

> Also if that's what I'm doing, I assume I should leave alone any headers
> already in the block/ directory that are used by other files that I'm
> not touching? eg block/qed.h already exists and is used by files other
> than the driver and probe, so it seems like I should leave that alone.

block/qed.h isn't used outside the driver. It's just that the driver
consists of multiple files. If you decide to move files, of course you
shouldn't only move qed.c, but qed-*.c, too.

Kevin



reply via email to

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