2537 |
"-s wait gdb connection to port %d\n" |
"-s wait gdb connection to port %d\n" |
2538 |
"-p port change gdb connection port\n" |
"-p port change gdb connection port\n" |
2539 |
"-d item1,... output log to %s (use -d ? for a list of log items)\n" |
"-d item1,... output log to %s (use -d ? for a list of log items)\n" |
2540 |
"-hdachs c,h,s force hard disk 0 geometry (usually qemu can guess it)\n" |
"-hdachs c,h,s[,t] force hard disk 0 physical geometry and the optional BIOS\n" |
2541 |
|
" translation (t=none or lba) (usually qemu can guess them)\n" |
2542 |
"-L path set the directory for the BIOS and VGA BIOS\n" |
"-L path set the directory for the BIOS and VGA BIOS\n" |
2543 |
#ifdef USE_CODE_COPY |
#ifdef USE_CODE_COPY |
2544 |
"-no-code-copy disable code copy acceleration\n" |
"-no-code-copy disable code copy acceleration\n" |
2754 |
const char *hd_filename[MAX_DISKS], *fd_filename[MAX_FD]; |
const char *hd_filename[MAX_DISKS], *fd_filename[MAX_FD]; |
2755 |
const char *kernel_filename, *kernel_cmdline; |
const char *kernel_filename, *kernel_cmdline; |
2756 |
DisplayState *ds = &display_state; |
DisplayState *ds = &display_state; |
2757 |
int cyls, heads, secs; |
int cyls, heads, secs, translation; |
2758 |
int start_emulation = 1; |
int start_emulation = 1; |
2759 |
uint8_t macaddr[6]; |
uint8_t macaddr[6]; |
2760 |
int net_if_type, nb_tun_fds, tun_fds[MAX_NICS]; |
int net_if_type, nb_tun_fds, tun_fds[MAX_NICS]; |
2789 |
kernel_cmdline = ""; |
kernel_cmdline = ""; |
2790 |
has_cdrom = 1; |
has_cdrom = 1; |
2791 |
cyls = heads = secs = 0; |
cyls = heads = secs = 0; |
2792 |
|
translation = BIOS_ATA_TRANSLATION_AUTO; |
2793 |
pstrcpy(monitor_device, sizeof(monitor_device), "vc"); |
pstrcpy(monitor_device, sizeof(monitor_device), "vc"); |
2794 |
|
|
2795 |
pstrcpy(serial_devices[0], sizeof(serial_devices[0]), "vc"); |
pstrcpy(serial_devices[0], sizeof(serial_devices[0]), "vc"); |
2859 |
const char *p; |
const char *p; |
2860 |
p = optarg; |
p = optarg; |
2861 |
cyls = strtol(p, (char **)&p, 0); |
cyls = strtol(p, (char **)&p, 0); |
2862 |
|
if (cyls < 1 || cyls > 16383) |
2863 |
|
goto chs_fail; |
2864 |
if (*p != ',') |
if (*p != ',') |
2865 |
goto chs_fail; |
goto chs_fail; |
2866 |
p++; |
p++; |
2867 |
heads = strtol(p, (char **)&p, 0); |
heads = strtol(p, (char **)&p, 0); |
2868 |
|
if (heads < 1 || heads > 16) |
2869 |
|
goto chs_fail; |
2870 |
if (*p != ',') |
if (*p != ',') |
2871 |
goto chs_fail; |
goto chs_fail; |
2872 |
p++; |
p++; |
2873 |
secs = strtol(p, (char **)&p, 0); |
secs = strtol(p, (char **)&p, 0); |
2874 |
if (*p != '\0') { |
if (secs < 1 || secs > 63) |
2875 |
|
goto chs_fail; |
2876 |
|
if (*p == ',') { |
2877 |
|
p++; |
2878 |
|
if (!strcmp(p, "none")) |
2879 |
|
translation = BIOS_ATA_TRANSLATION_NONE; |
2880 |
|
else if (!strcmp(p, "lba")) |
2881 |
|
translation = BIOS_ATA_TRANSLATION_LBA; |
2882 |
|
else if (!strcmp(p, "auto")) |
2883 |
|
translation = BIOS_ATA_TRANSLATION_AUTO; |
2884 |
|
else |
2885 |
|
goto chs_fail; |
2886 |
|
} else if (*p != '\0') { |
2887 |
chs_fail: |
chs_fail: |
2888 |
cyls = 0; |
fprintf(stderr, "qemu: invalid physical CHS format\n"); |
2889 |
|
exit(1); |
2890 |
} |
} |
2891 |
} |
} |
2892 |
break; |
break; |
3249 |
hd_filename[i]); |
hd_filename[i]); |
3250 |
exit(1); |
exit(1); |
3251 |
} |
} |
3252 |
if (i == 0 && cyls != 0) |
if (i == 0 && cyls != 0) { |
3253 |
bdrv_set_geometry_hint(bs_table[i], cyls, heads, secs); |
bdrv_set_geometry_hint(bs_table[i], cyls, heads, secs); |
3254 |
|
bdrv_set_translation_hint(bs_table[i], translation); |
3255 |
|
} |
3256 |
} |
} |
3257 |
} |
} |
3258 |
|
|