summaryrefslogtreecommitdiffstats
path: root/include/qemu/osdep.h
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2013-05-18 06:31:48 +0200
committerMichael Roth <mdroth@linux.vnet.ibm.com>2013-05-30 11:37:37 -0500
commite2ea3515a9d2d747f91dadf361afcbeb57a71500 (patch)
tree8ee87328e85454ee845c2896708f49c893bd71bc /include/qemu/osdep.h
parent87d23f78aa79b72da022afda358bbc8a8509ca70 (diff)
downloadhqemu-e2ea3515a9d2d747f91dadf361afcbeb57a71500.zip
hqemu-e2ea3515a9d2d747f91dadf361afcbeb57a71500.tar.gz
osdep: add qemu_get_local_state_pathname()
This function returns ${prefix}/var/RELATIVE_PATHNAME on POSIX-y systems, and <CSIDL_COMMON_APPDATA>/RELATIVE_PATHNAME on Win32. http://msdn.microsoft.com/en-us/library/bb762494.aspx [...] This folder is used for application data that is not user specific. For example, an application can store a spell-check dictionary, a database of clip art, or a log file in the CSIDL_COMMON_APPDATA folder. [...] Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r--include/qemu/osdep.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 57d7b1f..26136f1 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -204,4 +204,15 @@ const char *qemu_get_version(void);
void fips_set_state(bool requested);
bool fips_get_state(void);
+/* Return a dynamically allocated pathname denoting a file or directory that is
+ * appropriate for storing local state.
+ *
+ * @relative_pathname need not start with a directory separator; one will be
+ * added automatically.
+ *
+ * The caller is responsible for releasing the value returned with g_free()
+ * after use.
+ */
+char *qemu_get_local_state_pathname(const char *relative_pathname);
+
#endif
OpenPOWER on IntegriCloud