]> git.proxmox.com Git - mirror_qemu.git/commitdiff
PPC: KVM: Remove kvmppc_read_host_property
authorAlexander Graf <agraf@suse.de>
Thu, 21 Jul 2011 00:46:11 +0000 (02:46 +0200)
committerAlexander Graf <agraf@suse.de>
Thu, 6 Oct 2011 07:43:35 +0000 (09:43 +0200)
We just got rid of the last user of kvmppc_read_host_property, so we
can now safely remove it.

Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/kvm_ppc.c
target-ppc/kvm_ppc.h

index 26ecc9d25f245b24e58f98db40f1a8e824a50746..24fc6bce3b86c34b74649199c95b6bcc7e1e2007 100644 (file)
 static QEMUTimer *kvmppc_timer;
 static unsigned int kvmppc_timer_rate;
 
-#ifdef CONFIG_FDT
-int kvmppc_read_host_property(const char *node_path, const char *prop,
-                                     void *val, size_t len)
-{
-    char *path;
-    FILE *f;
-    int ret = 0;
-    int pathlen;
-
-    pathlen = snprintf(NULL, 0, "%s/%s/%s", PROC_DEVTREE_PATH, node_path, prop)
-              + 1;
-    path = g_malloc(pathlen);
-
-    snprintf(path, pathlen, "%s/%s/%s", PROC_DEVTREE_PATH, node_path, prop);
-
-    f = fopen(path, "rb");
-    if (f == NULL) {
-        ret = errno;
-        goto free;
-    }
-
-    len = fread(val, len, 1, f);
-    if (len != 1) {
-        ret = ferror(f);
-        goto close;
-    }
-
-close:
-    fclose(f);
-free:
-    free(path);
-    return ret;
-}
-#endif
-
 static void kvmppc_timer_hack(void *opaque)
 {
     qemu_notify_event();
index 7c08c0f4eb7ae5949fa0dafbe23e1bceed84ea40..0c659c8d75d6469f58257c56b8b0afcc20134795 100644 (file)
 #define __KVM_PPC_H__
 
 void kvmppc_init(void);
-#ifndef CONFIG_KVM
-static inline int kvmppc_read_host_property(const char *node_path, const char *prop,
-                                            void *val, size_t len)
-{
-    assert(0);
-    return -ENOSYS;
-}
-#else
-int kvmppc_read_host_property(const char *node_path, const char *prop,
-                                     void *val, size_t len);
-#endif
 
 uint32_t kvmppc_get_tbfreq(void);
 uint64_t kvmppc_get_clockfreq(void);