Message ID | 1410891148-28849-18-git-send-email-armbru@redhat.com |
---|---|
State | New |
Headers | show |
On Tue, Sep 16, 2014 at 08:12:22PM +0200, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster <armbru@redhat.com> > --- > block/block-backend.c | 1 - > blockdev.c | 3 +-- > include/sysemu/blockdev.h | 1 - > 3 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a/block/block-backend.c b/block/block-backend.c > index 5f796b4..141a31b 100644 > --- a/block/block-backend.c > +++ b/block/block-backend.c > @@ -104,7 +104,6 @@ static void drive_info_del(DriveInfo *dinfo) > if (dinfo->opts) { > qemu_opts_del(dinfo->opts); > } > - g_free(dinfo->id); > g_free(dinfo->serial); > g_free(dinfo); > } > diff --git a/blockdev.c b/blockdev.c > index e87bf4b..2def256 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -458,7 +458,6 @@ static BlockBackend *blockdev_init(const char *file, QDict *bs_opts, > } > > dinfo = g_malloc0(sizeof(*dinfo)); > - dinfo->id = g_strdup(qemu_opts_id(opts)); > blk_set_legacy_dinfo(blk, dinfo); > > if (!file || !*file) { > @@ -492,7 +491,7 @@ static BlockBackend *blockdev_init(const char *file, QDict *bs_opts, > > if (ret < 0) { > error_setg(errp, "could not open disk image %s: %s", > - file ?: dinfo->id, error_get_pretty(error)); > + file ?: blk_name(blk), error_get_pretty(error)); > error_free(error); > goto err; > } > diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h > index f66b89a..27a40d5 100644 > --- a/include/sysemu/blockdev.h > +++ b/include/sysemu/blockdev.h > @@ -30,7 +30,6 @@ typedef enum { > } BlockInterfaceType; > > struct DriveInfo { > - char *id; > const char *devaddr; > BlockInterfaceType type; > int bus; > -- > 1.9.3 > Reviewed-by: Benoit Canet <benoit.canet@nodalink.com>
On 16.09.2014 20:12, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster <armbru@redhat.com> > --- > block/block-backend.c | 1 - > blockdev.c | 3 +-- > include/sysemu/blockdev.h | 1 - > 3 files changed, 1 insertion(+), 4 deletions(-) Reviewed-by: Max Reitz <mreitz@redhat.com>
Am 16.09.2014 um 20:12 hat Markus Armbruster geschrieben: > Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
diff --git a/block/block-backend.c b/block/block-backend.c index 5f796b4..141a31b 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -104,7 +104,6 @@ static void drive_info_del(DriveInfo *dinfo) if (dinfo->opts) { qemu_opts_del(dinfo->opts); } - g_free(dinfo->id); g_free(dinfo->serial); g_free(dinfo); } diff --git a/blockdev.c b/blockdev.c index e87bf4b..2def256 100644 --- a/blockdev.c +++ b/blockdev.c @@ -458,7 +458,6 @@ static BlockBackend *blockdev_init(const char *file, QDict *bs_opts, } dinfo = g_malloc0(sizeof(*dinfo)); - dinfo->id = g_strdup(qemu_opts_id(opts)); blk_set_legacy_dinfo(blk, dinfo); if (!file || !*file) { @@ -492,7 +491,7 @@ static BlockBackend *blockdev_init(const char *file, QDict *bs_opts, if (ret < 0) { error_setg(errp, "could not open disk image %s: %s", - file ?: dinfo->id, error_get_pretty(error)); + file ?: blk_name(blk), error_get_pretty(error)); error_free(error); goto err; } diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h index f66b89a..27a40d5 100644 --- a/include/sysemu/blockdev.h +++ b/include/sysemu/blockdev.h @@ -30,7 +30,6 @@ typedef enum { } BlockInterfaceType; struct DriveInfo { - char *id; const char *devaddr; BlockInterfaceType type; int bus;
Signed-off-by: Markus Armbruster <armbru@redhat.com> --- block/block-backend.c | 1 - blockdev.c | 3 +-- include/sysemu/blockdev.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-)