aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/pvpanic.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-05-30 16:07:58 +0300
committerMichael S. Tsirkin <mst@redhat.com>2013-06-02 18:14:14 +0300
commit600c60b76d0682f6c39d19bfff79da9321e8cf86 (patch)
treeda4eadd1f226e1a6fafaf0ac51f255d0c1f9cd2d /hw/misc/pvpanic.c
parent45936c8b79012da4c8986c20af4afcc9cd14bb8e (diff)
fw_cfg: add API to find FW cfg object
Remove some code duplication by adding a function to look up the fw cfg file. This way, we don't need to duplicate same strings everywhere. Use by both fw cfg and pvpanic device. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/misc/pvpanic.c')
-rw-r--r--hw/misc/pvpanic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
index 31e1b1d8e3..159340f5f7 100644
--- a/hw/misc/pvpanic.c
+++ b/hw/misc/pvpanic.c
@@ -96,7 +96,7 @@ static int pvpanic_isa_initfn(ISADevice *dev)
isa_register_ioport(dev, &s->io, s->ioport);
if (!port_configured) {
- fw_cfg = object_resolve_path("/machine/fw_cfg", NULL);
+ fw_cfg = fw_cfg_find();
if (fw_cfg) {
fw_cfg_add_file(fw_cfg, "etc/pvpanic-port",
g_memdup(&s->ioport, sizeof(s->ioport)),