aboutsummaryrefslogtreecommitdiff
path: root/os-posix.c
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2010-06-10 11:42:25 +0200
committerBlue Swirl <blauwirbel@gmail.com>2010-06-12 08:49:15 +0300
commit59a5264b994343f01d19faf95c0e5df70346ded8 (patch)
tree79bfcd1fe59e9d6d945a267b866d903ac0e36da5 /os-posix.c
parent9f16732a062fc7a3ffc5909dc681f05455cfdabc (diff)
Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c
Introduce OS specific cmdline argument handling by calling os_parse_cmd_args() at the end of switch() statement. Move option enum to qemu-options.h and have it included from os-posix.c and os-win32.c in addition to vl.c. In addition move SMB argument to os-posix.c Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Richard Henderson <rth@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'os-posix.c')
-rw-r--r--os-posix.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/os-posix.c b/os-posix.c
index 621ad062b0..0deddf3e41 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -33,6 +33,8 @@
/* Needed early for CONFIG_BSD etc. */
#include "config-host.h"
#include "sysemu.h"
+#include "net/slirp.h"
+#include "qemu-options.h"
void os_setup_early_signal_handling(void)
{
@@ -130,3 +132,20 @@ char *os_find_datadir(const char *argv0)
}
#undef SHARE_SUFFIX
#undef BUILD_SUFFIX
+
+/*
+ * Parse OS specific command line options.
+ * return 0 if option handled, -1 otherwise
+ */
+void os_parse_cmd_args(int index, const char *optarg)
+{
+ switch (index) {
+#ifdef CONFIG_SLIRP
+ case QEMU_OPTION_smb:
+ if (net_slirp_smb(optarg) < 0)
+ exit(1);
+ break;
+#endif
+ }
+ return;
+}