diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2018-01-25 09:53:53 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2018-01-25 09:53:53 +0000 |
| commit | 0f79bfe38a2cf0f43c7ea4959da7f8ebd7858f3d (patch) | |
| tree | 80981403f3a897a1e20808e3c7a76fe082ddfc30 /hw/core/qdev.c | |
| parent | f78b6f9b1161fb67f3ac54e73f7f37464cbff76f (diff) | |
| parent | 95d0307cc10ca3df879c1be519f1ad650efb20a8 (diff) | |
| download | focaccia-qemu-0f79bfe38a2cf0f43c7ea4959da7f8ebd7858f3d.tar.gz focaccia-qemu-0f79bfe38a2cf0f43c7ea4959da7f8ebd7858f3d.zip | |
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request' into staging
# gpg: Signature made Tue 23 Jan 2018 14:47:41 GMT # gpg: using RSA key 0xF30C38BD3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" # gpg: aka "Laurent Vivier <laurent@vivier.eu>" # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/linux-user-for-2.12-pull-request: linux-user: implement renameat2 page_unprotect(): handle calls to pages that are PAGE_WRITE linux-user: Propagate siginfo_t through to handle_cpu_signal() linux-user: remove nmi.c and fw-path-provider.c linux-user: Add getcpu() support linux-user: Add AT_SECURE auxval linux-user: Fix sched_get/setaffinity conversion linux-user/mmap.c: Avoid choosing NULL as start address linux-user: Translate flags argument to dup3 syscall linux-user: Don't use CMSG_ALIGN(sizeof struct cmsghdr) linux-user: Fix length calculations in host_to_target_cmsg() linux-user: wrap fork() in a start/end exclusive section linux-user: Fix locking order in fork_start() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/core/qdev.c')
| -rw-r--r-- | hw/core/qdev.c | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c index f739753e3a..2456035d1a 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -27,7 +27,6 @@ #include "qemu/osdep.h" #include "hw/qdev.h" -#include "hw/fw-path-provider.h" #include "sysemu/sysemu.h" #include "qapi/qmp/qerror.h" #include "qapi/visitor.h" @@ -48,17 +47,6 @@ const VMStateDescription *qdev_get_vmsd(DeviceState *dev) return dc->vmsd; } -const char *qdev_fw_name(DeviceState *dev) -{ - DeviceClass *dc = DEVICE_GET_CLASS(dev); - - if (dc->fw_name) { - return dc->fw_name; - } - - return object_get_typename(OBJECT(dev)); -} - static void bus_remove_child(BusState *bus, DeviceState *child) { BusChild *kid; @@ -631,71 +619,6 @@ DeviceState *qdev_find_recursive(BusState *bus, const char *id) return NULL; } -static char *bus_get_fw_dev_path(BusState *bus, DeviceState *dev) -{ - BusClass *bc = BUS_GET_CLASS(bus); - - if (bc->get_fw_dev_path) { - return bc->get_fw_dev_path(dev); - } - - return NULL; -} - -static char *qdev_get_fw_dev_path_from_handler(BusState *bus, DeviceState *dev) -{ - Object *obj = OBJECT(dev); - char *d = NULL; - - while (!d && obj->parent) { - obj = obj->parent; - d = fw_path_provider_try_get_dev_path(obj, bus, dev); - } - return d; -} - -char *qdev_get_own_fw_dev_path_from_handler(BusState *bus, DeviceState *dev) -{ - Object *obj = OBJECT(dev); - - return fw_path_provider_try_get_dev_path(obj, bus, dev); -} - -static int qdev_get_fw_dev_path_helper(DeviceState *dev, char *p, int size) -{ - int l = 0; - - if (dev && dev->parent_bus) { - char *d; - l = qdev_get_fw_dev_path_helper(dev->parent_bus->parent, p, size); - d = qdev_get_fw_dev_path_from_handler(dev->parent_bus, dev); - if (!d) { - d = bus_get_fw_dev_path(dev->parent_bus, dev); - } - if (d) { - l += snprintf(p + l, size - l, "%s", d); - g_free(d); - } else { - return l; - } - } - l += snprintf(p + l , size - l, "/"); - - return l; -} - -char* qdev_get_fw_dev_path(DeviceState *dev) -{ - char path[128]; - int l; - - l = qdev_get_fw_dev_path_helper(dev, path, 128); - - path[l-1] = '\0'; - - return g_strdup(path); -} - char *qdev_get_dev_path(DeviceState *dev) { BusClass *bc; |