From e2ea3515a9d2d747f91dadf361afcbeb57a71500 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Sat, 18 May 2013 06:31:48 +0200 Subject: osdep: add qemu_get_local_state_pathname() This function returns ${prefix}/var/RELATIVE_PATHNAME on POSIX-y systems, and /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 Signed-off-by: Michael Roth --- include/qemu/osdep.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 57d7b1fb4d..26136f16ec 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 -- cgit v1.2.3-55-g7522