ia64/xen-unstable

changeset 16866:79497be10105

ioemu: Use asprintf instead of PATH_MAX, which POSIX says to be facultative.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jan 23 18:05:12 2008 +0000 (2008-01-23)
parents 019f5bd23ea5
children ed540d61339e
files tools/ioemu/target-i386-dm/helper2.c
line diff
     1.1 --- a/tools/ioemu/target-i386-dm/helper2.c	Wed Jan 23 18:03:52 2008 +0000
     1.2 +++ b/tools/ioemu/target-i386-dm/helper2.c	Wed Jan 23 18:05:12 2008 +0000
     1.3 @@ -635,7 +635,7 @@ int main_loop(void)
     1.4      extern int suspend_requested;
     1.5      CPUState *env = cpu_single_env;
     1.6      int evtchn_fd = xce_handle == -1 ? -1 : xc_evtchn_fd(xce_handle);
     1.7 -    char qemu_file[PATH_MAX];
     1.8 +    char *qemu_file;
     1.9      fd_set fds;
    1.10      int ret = 0;
    1.11  
    1.12 @@ -665,9 +665,9 @@ int main_loop(void)
    1.13          main_loop_wait(1); /* For the select() on events */
    1.14  
    1.15          /* Save the device state */
    1.16 -        snprintf(qemu_file, sizeof(qemu_file), 
    1.17 -                 "/var/lib/xen/qemu-save.%d", domid);
    1.18 +        asprintf(&qemu_file, "/var/lib/xen/qemu-save.%d", domid);
    1.19          do_savevm(qemu_file);
    1.20 +        free(qemu_file);
    1.21  
    1.22          xenstore_record_dm_state("paused");
    1.23