aboutsummaryrefslogtreecommitdiff
path: root/vl.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 /vl.c
parentRename qemu-options.h to qemu-options.def (diff)
downloadqemu-kvm-59a5264b994343f01d19faf95c0e5df70346ded8.tar.gz
qemu-kvm-59a5264b994343f01d19faf95c0e5df70346ded8.tar.bz2
qemu-kvm-59a5264b994343f01d19faf95c0e5df70346ded8.zip
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 'vl.c')
-rw-r--r--vl.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/vl.c b/vl.c
index 4998e87c7..b08b5adf9 100644
--- a/vl.c
+++ b/vl.c
@@ -148,6 +148,7 @@ int main(int argc, char **argv)
#include "qemu-option.h"
#include "qemu-config.h"
#include "qemu-objects.h"
+#include "qemu-options.h"
#ifdef CONFIG_LINUX
#include "fsdev/qemu-fsdev.h"
#endif
@@ -1899,16 +1900,6 @@ static void help(int exitcode)
#define HAS_ARG 0x0001
-enum {
-#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \
- opt_enum,
-#define DEFHEADING(text)
-#include "qemu-options.def"
-#undef DEF
-#undef DEFHEADING
-#undef GEN_DOCS
-};
-
typedef struct QEMUOption {
const char *name;
int flags;
@@ -2624,12 +2615,6 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_bootp:
legacy_bootp_filename = optarg;
break;
-#ifndef _WIN32
- case QEMU_OPTION_smb:
- if (net_slirp_smb(optarg) < 0)
- exit(1);
- break;
-#endif
case QEMU_OPTION_redir:
if (net_slirp_redir(optarg) < 0)
exit(1);
@@ -3126,6 +3111,8 @@ int main(int argc, char **argv, char **envp)
fclose(fp);
break;
}
+ default:
+ os_parse_cmd_args(popt->index, optarg);
}
}
}