Revision a5cf8262
b/hw/ide/qdev.c | ||
---|---|---|
60 | 60 |
snprintf(path, sizeof(path), "%s@%d", qdev_fw_name(dev), |
61 | 61 |
((IDEBus*)dev->parent_bus)->bus_id); |
62 | 62 |
|
63 |
return strdup(path); |
|
63 |
return g_strdup(path);
|
|
64 | 64 |
} |
65 | 65 |
|
66 | 66 |
static int ide_qdev_init(DeviceState *qdev) |
b/hw/isa-bus.c | ||
---|---|---|
236 | 236 |
snprintf(path + off, sizeof(path) - off, "@%04x", d->ioport_id); |
237 | 237 |
} |
238 | 238 |
|
239 |
return strdup(path); |
|
239 |
return g_strdup(path);
|
|
240 | 240 |
} |
241 | 241 |
|
242 | 242 |
MemoryRegion *isa_address_space(ISADevice *dev) |
b/hw/pci.c | ||
---|---|---|
1962 | 1962 |
PCI_SLOT(d->devfn)); |
1963 | 1963 |
if (PCI_FUNC(d->devfn)) |
1964 | 1964 |
snprintf(path + off, sizeof(path) + off, ",%x", PCI_FUNC(d->devfn)); |
1965 |
return strdup(path); |
|
1965 |
return g_strdup(path);
|
|
1966 | 1966 |
} |
1967 | 1967 |
|
1968 | 1968 |
static char *pcibus_get_dev_path(DeviceState *dev) |
b/hw/qdev.c | ||
---|---|---|
520 | 520 |
|
521 | 521 |
path[l-1] = '\0'; |
522 | 522 |
|
523 |
return strdup(path); |
|
523 |
return g_strdup(path);
|
|
524 | 524 |
} |
525 | 525 |
|
526 | 526 |
char *qdev_get_dev_path(DeviceState *dev) |
b/hw/scsi-bus.c | ||
---|---|---|
1723 | 1723 |
static char *scsibus_get_fw_dev_path(DeviceState *dev) |
1724 | 1724 |
{ |
1725 | 1725 |
SCSIDevice *d = SCSI_DEVICE(dev); |
1726 |
char path[100]; |
|
1727 |
|
|
1728 |
snprintf(path, sizeof(path), "channel@%x/%s@%x,%x", d->channel, |
|
1729 |
qdev_fw_name(dev), d->id, d->lun); |
|
1730 |
|
|
1731 |
return strdup(path); |
|
1726 |
return g_strdup_printf("channel@%x/%s@%x,%x", d->channel, |
|
1727 |
qdev_fw_name(dev), d->id, d->lun); |
|
1732 | 1728 |
} |
1733 | 1729 |
|
1734 | 1730 |
SCSIDevice *scsi_device_find(SCSIBus *bus, int channel, int id, int lun) |
b/hw/sysbus.c | ||
---|---|---|
211 | 211 |
snprintf(path + off, sizeof(path) - off, "@i%04x", s->pio[0]); |
212 | 212 |
} |
213 | 213 |
|
214 |
return strdup(path); |
|
214 |
return g_strdup(path);
|
|
215 | 215 |
} |
216 | 216 |
|
217 | 217 |
void sysbus_add_memory(SysBusDevice *dev, target_phys_addr_t addr, |
Also available in: Unified diff