summaryrefslogtreecommitdiffstats
path: root/qemu/os-posix.c
diff options
context:
space:
mode:
authorDon Dugger <n0ano@n0ano.com>2016-06-03 03:33:22 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-03 03:33:23 +0000
commitda27230f80795d0028333713f036d44c53cb0e68 (patch)
treeb3d379eaf000adf72b36cb01cdf4d79c3e3f064c /qemu/os-posix.c
parent0e68cb048bb8aadb14675f5d4286d8ab2fc35449 (diff)
parent437fd90c0250dee670290f9b714253671a990160 (diff)
Merge "These changes are the raw update to qemu-2.6."
Diffstat (limited to 'qemu/os-posix.c')
-rw-r--r--qemu/os-posix.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/qemu/os-posix.c b/qemu/os-posix.c
index e4da406f3..107fde38b 100644
--- a/qemu/os-posix.c
+++ b/qemu/os-posix.c
@@ -23,10 +23,7 @@
* THE SOFTWARE.
*/
-#include <unistd.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <sys/types.h>
+#include "qemu/osdep.h"
#include <sys/wait.h>
/*needed for MAP_POPULATE before including qemu-options.h */
#include <sys/mman.h>
@@ -35,11 +32,13 @@
#include <libgen.h>
/* Needed early for CONFIG_BSD etc. */
-#include "config-host.h"
#include "sysemu/sysemu.h"
#include "net/slirp.h"
#include "qemu-options.h"
#include "qemu/rcu.h"
+#include "qemu/error-report.h"
+#include "qemu/log.h"
+#include "qemu/cutils.h"
#ifdef CONFIG_LINUX
#include <sys/prctl.h>
@@ -139,6 +138,8 @@ void os_parse_cmd_args(int index, const char *optarg)
switch (index) {
#ifdef CONFIG_SLIRP
case QEMU_OPTION_smb:
+ error_report("The -smb option is deprecated. "
+ "Please use '-netdev user,smb=...' instead.");
if (net_slirp_smb(optarg) < 0)
exit(1);
break;
@@ -276,7 +277,10 @@ void os_setup_post(void)
dup2(fd, 0);
dup2(fd, 1);
- dup2(fd, 2);
+ /* In case -D is given do not redirect stderr to /dev/null */
+ if (!qemu_logfile) {
+ dup2(fd, 2);
+ }
close(fd);