Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to qemu-2.6.
[kvmfornfv.git]
/
qemu
/
hw
/
ide
/
qdev.c
diff --git
a/qemu/hw/ide/qdev.c
b/qemu/hw/ide/qdev.c
index
788b361
..
4bc74a3
100644
(file)
--- a/
qemu/hw/ide/qdev.c
+++ b/
qemu/hw/ide/qdev.c
@@
-16,8
+16,10
@@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include <hw/hw.h>
#include "sysemu/dma.h"
#include <hw/hw.h>
#include "sysemu/dma.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include <hw/ide/internal.h>
#include "sysemu/block-backend.h"
#include "qemu/error-report.h"
#include <hw/ide/internal.h>
#include "sysemu/block-backend.h"
@@
-118,7
+120,8
@@
IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive)
dev = qdev_create(&bus->qbus, drive->media_cd ? "ide-cd" : "ide-hd");
qdev_prop_set_uint32(dev, "unit", unit);
dev = qdev_create(&bus->qbus, drive->media_cd ? "ide-cd" : "ide-hd");
qdev_prop_set_uint32(dev, "unit", unit);
- qdev_prop_set_drive_nofail(dev, "drive", blk_by_legacy_dinfo(drive));
+ qdev_prop_set_drive(dev, "drive", blk_by_legacy_dinfo(drive),
+ &error_fatal);
qdev_init_nofail(dev);
return DO_UPCAST(IDEDevice, qdev, dev);
}
qdev_init_nofail(dev);
return DO_UPCAST(IDEDevice, qdev, dev);
}
@@
-171,7
+174,7
@@
static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind)
blkconf_serial(&dev->conf, &dev->serial);
if (kind != IDE_CD) {
blkconf_serial(&dev->conf, &dev->serial);
if (kind != IDE_CD) {
- blkconf_geometry(&dev->conf, &dev->chs_trans, 6553
6
, 16, 255, &err);
+ blkconf_geometry(&dev->conf, &dev->chs_trans, 6553
5
, 16, 255, &err);
if (err) {
error_report_err(err);
return -1;
if (err) {
error_report_err(err);
return -1;
@@
-198,22
+201,22
@@
static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind)
return 0;
}
return 0;
}
-static void ide_dev_get_bootindex(Object *obj, Visitor *v,
void *opaqu
e,
-
const char *nam
e, Error **errp)
+static void ide_dev_get_bootindex(Object *obj, Visitor *v,
const char *nam
e,
+
void *opaqu
e, Error **errp)
{
IDEDevice *d = IDE_DEVICE(obj);
{
IDEDevice *d = IDE_DEVICE(obj);
- visit_type_int32(v,
&d->conf.bootindex, name
, errp);
+ visit_type_int32(v,
name, &d->conf.bootindex
, errp);
}
}
-static void ide_dev_set_bootindex(Object *obj, Visitor *v,
void *opaqu
e,
-
const char *nam
e, Error **errp)
+static void ide_dev_set_bootindex(Object *obj, Visitor *v,
const char *nam
e,
+
void *opaqu
e, Error **errp)
{
IDEDevice *d = IDE_DEVICE(obj);
int32_t boot_index;
Error *local_err = NULL;
{
IDEDevice *d = IDE_DEVICE(obj);
int32_t boot_index;
Error *local_err = NULL;
- visit_type_int32(v,
&boot_index, name
, &local_err);
+ visit_type_int32(v,
name, &boot_index
, &local_err);
if (local_err) {
goto out;
}
if (local_err) {
goto out;
}