History | View | Annotate | Download (6 kB)
util: Split out exec_dir from os_find_datadir
With this change, main() calls qemu_init_exec_dir and uses argv0 toinit exec_dir. The saved value can be retrieved withqemu_get_exec_dir later. It will be reused by module loading.
Signed-off-by: Fam Zheng <famz@redhat.com>...
osdep: add qemu_set_tty_echo()
Using stdin with readline.c requires disabling echo and line buffering.Add a portable wrapper to set the terminal attributes under Linux andWindows.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR
If a socket is closed it remains in TIME_WAIT state for some time. On operatingsystems using BSD sockets the endpoint of the socket may not be reused while inthis state unless SO_REUSEADDR was set on the socket. On windows on the other...
exec: Don't abort when we can't allocate guest memory
We abort() on memory allocation failure. abort() is appropriate forprogramming errors. Maybe most memory allocation failures areprogramming errors, maybe not. But guest memory allocation failureisn't, and aborting when the user asks for more memory than we can...
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...
osdep, kvm: rename low-level RAM allocation functions
This is preparatory to the introduction of a separate freeing API.
Reported-by: Amos Kong <akong@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Amos Kong <akong@redhat.com>...
osdep: introduce qemu_anon_ram_free to free qemu_anon_ram_alloc-ed memory
We switched from qemu_memalign to mmap() but then we don't modifyqemu_vfree() to do a munmap() over free(). Which we cannot dobecause qemu_vfree() frees memory allocated by qemu_{mem,block}align....
oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()
The fcntl(fd, F_SETFL, O_NONBLOCK) flag is not specific to sockets.Rename to qemu_set_nonblock() just like qemu_set_cloexec().
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
w32: Make qemu_vfree() accept NULL like the POSIX implementation
On POSIX, qemu_vfree() accepts NULL, because it's merely wrapperaround free(). As far as I can tell, the Windows implementationdoesn't. Breeds bugs that bite only under Windows.
Make the Windows implementation behave like the POSIX implementation....
build: move libqemuutil.a components to util/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>