MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / main

Function main

tinyemu/temu.c:647–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645#endif
646
647int main(int argc, char **argv)
648{
649 VirtMachine *s;
650 const char *path, *cmdline, *build_preload_file;
651 int c, option_index, i, ram_size, accel_enable;
652 BOOL allow_ctrlc;
653 BlockDeviceModeEnum drive_mode;
654 VirtMachineParams p_s, *p = &p_s;
655
656 ram_size = -1;
657 allow_ctrlc = FALSE;
658 (void)allow_ctrlc;
659 drive_mode = BF_MODE_SNAPSHOT;
660 accel_enable = -1;
661 cmdline = NULL;
662 build_preload_file = NULL;
663 for(;;) {
664 c = getopt_long_only(argc, argv, "hm:", options, &option_index);
665 if (c == -1)
666 break;
667 switch(c) {
668 case 0:
669 switch(option_index) {
670 case 1: /* ctrlc */
671 allow_ctrlc = TRUE;
672 break;
673 case 2: /* rw */
674 drive_mode = BF_MODE_RW;
675 break;
676 case 3: /* ro */
677 drive_mode = BF_MODE_RO;
678 break;
679 case 4: /* append */
680 cmdline = optarg;
681 break;
682 case 5: /* no-accel */
683 accel_enable = FALSE;
684 break;
685 case 6: /* build-preload */
686 build_preload_file = optarg;
687 break;
688 default:
689 fprintf(stderr, "unknown option index: %d\n", option_index);
690 exit(1);
691 }
692 break;
693 case 'h':
694 help();
695 break;
696 case 'm':
697 ram_size = strtoul(optarg, NULL, 0);
698 break;
699 default:
700 exit(1);
701 }
702 }
703
704 if (optind >= argc) {

Callers

nothing calls this directly

Calls 15

fs_wget_initFunction · 0.85
fs_net_event_loopFunction · 0.85
vm_add_cmdlineFunction · 0.85
get_file_pathFunction · 0.85
is_urlFunction · 0.85
block_device_init_httpFunction · 0.85
block_device_initFunction · 0.85
fs_net_initFunction · 0.85
fs_dump_cache_loadFunction · 0.85
fs_disk_initFunction · 0.85

Tested by

no test coverage detected