summaryrefslogtreecommitdiffstats
path: root/oslib-posix.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'eb47d7c5d96060040931c42773ee07e61e547af9' into upstream-mergeAvi Kivity2011-06-191-0/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'eb47d7c5d96060040931c42773ee07e61e547af9': (103 commits) hw/9118.c: Implement active-low interrupt support Introduce format string for pid_t smc91c111: qdevify reset Command line support for altering the log file location Allow nested qemu_bh_poll() after BH deletion ide: Clear error_status after restarting flush ide: add TRIM support ide: allow other dma comands than read and write make dma_bdrv_io available to drivers ide: Add forgotten VMSTATE_END_OF_LIST in subsection ide: Fix ide_drive_pio_state_needed() ide: Split error status from status register qcow2: Fix in-flight list after qcow2_cache_put failure Replaced tabs with spaces in block.h and block_int.h vdi: Avoid direct AIO callback qcow: Avoid direct AIO callback qcow2: Avoid direct AIO callback kvm: Enable CPU SMEP feature kvm: Add CPUID support for VIA CPU usb-ccid: Plug memory leak on qdev exit() ... Signed-off-by: Avi Kivity <[email protected]>
| * Darwin: Fix compilation warning regarding the deprecated daemon() functionAlexandre Raymond2011-06-141-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes since v1: create a wrapper function named qemu_daemon() in oslib-posix.c instead of putting the OS specific workaround in qemu-nbd.c directly. On OSX >= 10.5, daemon() is deprecated, resulting in the following warning: ----8<---- qemu-nbd.c: In function ‘main’: qemu-nbd.c:371: warning: ‘daemon’ is deprecated (declared at /usr/include/stdlib.h:289) ----8<---- The following trick, used in mDNSResponder, takes care of this warning: http://www.opensource.apple.com/source/mDNSResponder/mDNSResponder-258.18/mDNSPosix/PosixDaemon.c On OSX, it temporarily renames the daemon() function before including stdlib.h and declares it manually as an extern function. This way, the compiler does not see the declaration from stdlib.h and thus does not display the warning. Signed-off-by: Alexandre Raymond <[email protected]> Cc: Blue Swirl <[email protected]> Signed-off-by: Andreas Färber <[email protected]>
* | Merge commit 'e024e881bb1a8b5085026589360d26ed97acdd64' into upstream-mergeMarcelo Tosatti2011-01-061-0/+48
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e024e881bb1a8b5085026589360d26ed97acdd64': (133 commits) target-ppc: Implement correct NaN propagation rules target-mips: Implement correct NaN propagation rules softfloat: use float{32,64,x80,128}_maybe_silence_nan() softfloat: add float{x80,128}_maybe_silence_nan() softfloat: fix float{32,64}_maybe_silence_nan() for MIPS softfloat: rename *IsNaN variables to *IsQuietNaN softfloat: remove HPPA specific code target-ppc: use float32_is_any_nan() target-ppc: fix default qNaN target-ppc: remove PRECISE_EMULATION define microblaze: Use more TB chaining cirrus_vga: fix division by 0 for color expansion rop Fix curses on big endian hosts noaudio: correctly account acquired samples target-arm: Implement correct NaN propagation rules softfloat: abstract out target-specific NaN propagation rules softfloat: Rename float*_is_nan() functions to float*_is_quiet_nan() TCG: Improve tb_phys_hash_func() target-arm: fix UMAAL instruction Fix translation of unary PPC/SPE instructions (efdneg etc.). ... Signed-off-by: Marcelo Tosatti <[email protected]>
| * virtio-9p: fix build on !CONFIG_UTIMENSATHidetoshi Seto2010-12-021-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduce a fallback mechanism for old systems that do not support utimensat(). This fix build failure with following warnings: hw/virtio-9p-local.c: In function 'local_utimensat': hw/virtio-9p-local.c:479: warning: implicit declaration of function 'utimensat' hw/virtio-9p-local.c:479: warning: nested extern declaration of 'utimensat' and: hw/virtio-9p.c: In function 'v9fs_setattr_post_chmod': hw/virtio-9p.c:1410: error: 'UTIME_NOW' undeclared (first use in this function) hw/virtio-9p.c:1410: error: (Each undeclared identifier is reported only once hw/virtio-9p.c:1410: error: for each function it appears in.) hw/virtio-9p.c:1413: error: 'UTIME_OMIT' undeclared (first use in this function) hw/virtio-9p.c: In function 'v9fs_wstat_post_chmod': hw/virtio-9p.c:2905: error: 'UTIME_OMIT' undeclared (first use in this function) [NOTE: At this time virtio-9p is only user of utimensat(), and is available only when host is linux and CONFIG_VIRTFS is defined. So there are no similar warning for win32. Please provide a wrapper for win32 in oslib-win32.c if new user really requires it.] v5: - Allow fallback on runtime - Move qemu_utimensat() to oslib-posix.c - Rebased on latest qemu.git v4: - Use tv_now.tv_usec v3: - Use better alternative handling for UTIME_NOW/OMIT - Move qemu_utimensat() to cutils.c V2: - Introduce qemu_utimensat() Acked-by: Chris Wright <[email protected]> Acked-by: M. Mohan Kumar <[email protected]> Acked-by: Jes Sorensen <[email protected]> Signed-off-by: Hidetoshi Seto <[email protected]> Signed-off-by: Venkateswararao Jujjuri <[email protected]>
* | Merge remote branch 'upstream' into upstream-mergeAvi Kivity2010-11-141-5/+40
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream: (46 commits) add copyright to spiceaudio spice: add audio intel-hda: fix codec addressing. Revert "intel-hda: fix codec addressing." intel-hda: fix codec addressing. intel-hda: add msi support intel-hda: update irq status on WAKEEN changes. intel-hda: Honor WAKEEN bits. hda-audio: exit cleanup intel-hda: exit cleanup Fix win32 build scsi-disk: Fix immediate failure of bdrv_aio_* virtio-blk: Handle immediate flush failure properly ide: Handle immediate bdrv_aio_flush failure block: avoid a warning on 64 bit hosts with long as int64_t qcow2: Invalidate cache after failed read vpc: Implement bdrv_flush scsi-disk: Implement werror for flushes scsi-disk: Complete failed requests in scsi_disk_emulate_command block: Allow bdrv_flush to return errors ... Signed-off-by: Avi Kivity <[email protected]>
| * Consolidate oom_check() functionsJes Sorensen2010-10-301-5/+3
| | | | | | | | | | | | | | | | | | This consolidates the duplicated oom_check() functions, as well as splitting them into OS dependant versions to avoid the #ifdef grossness that was present in the old osdep.c version. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
| * qemu_pipe() is used only by POSIX code, so move to oslib-posix.cJes Sorensen2010-10-301-0/+22
| | | | | | | | | | Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
| * Move osdep socket code to oslib-{posix,win32}.cJes Sorensen2010-10-301-0/+15
| | | | | | | | | | Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
* | Merge commit 'c1b0b93b06ab026ef45ae02d0ee7557741910637' into upstream-mergeAvi Kivity2010-11-141-0/+4
|/ | | | | | | | | | | * commit 'c1b0b93b06ab026ef45ae02d0ee7557741910637': Move QEMU OS dependant library functions to OS specific files target-xxx: Use fprintf_function (format checking) Conflicts: osdep.c Signed-off-by: Avi Kivity <[email protected]>
* Move QEMU OS dependant library functions to OS specific filesJes Sorensen2010-10-301-0/+74
This moves library functions used by both QEMU and the QEMU tools, such as qemu-img, qemu-nbd etc. from osdep.c to oslib-{posix,win32}.c In addition it introduces oslib-obj.y to the Makefile set to be included by the various targets, instead of relying on these library functions magically getting included via block-obj-y. Signed-off-by: Jes Sorensen <[email protected]> Signed-off-by: Blue Swirl <[email protected]>