raw_bsd: register bdrv_raw
commit775d6afd5cd66f2154a81f5de9d3dd7297a35072
authorLaszlo Ersek <lersek@redhat.com>
Wed, 21 Aug 2013 10:41:22 +0000 (21 12:41 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 30 Aug 2013 13:28:52 +0000 (30 15:28 +0200)
tree06c952de81a553147b011bb4668db6620db6da3f
parentff369a483df89cc6ca510b0c3ab9afe9cf0bdfdc
raw_bsd: register bdrv_raw

On 08/05/13 15:03, Paolo Bonzini wrote:
>
> [...]
>
> 5) Formats are registered with bdrv_register (takes a BlockDriver*). You
> also need to pass the caller of bdrv_register to block_init.

Fill in the BlockDriver structure with the raw_*() functions that have
been added to "block/raw_bsd.c", in the order the fields are defined in
"include/block/block_int.h".

I needed more explanation / naming examples for registering the driver
than what Paolo gave me, so I copied / adapted from "block/qcow2.c". The
parts I took as basis for modification are blamed on

    commit 5efa9d5a8b18841c9c62208a494d7f519238979a
    Author: Anthony Liguori <aliguori@us.ibm.com>
    Date:   Sat May 9 17:03:42 2009 -0500

        Convert block infrastructure to use new module init functionality

    commit 20d97356c9df6d68fbd37d6334fdb7063f24eab6
    Author: Blue Swirl <blauwirbel@gmail.com>
    Date:   Fri Apr 23 20:19:47 2010 +0000

        Fix OpenBSD build

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/raw_bsd.c