Revision e0f084bf

b/vl.c
2402 2402
    return bitmap;
2403 2403
}
2404 2404

  
2405
static void restore_boot_devices(void *opaque)
2406
{
2407
    char *standard_boot_devices = opaque;
2408

  
2409
    qemu_boot_set(standard_boot_devices);
2410

  
2411
    qemu_unregister_reset(restore_boot_devices, standard_boot_devices);
2412
    qemu_free(standard_boot_devices);
2413
}
2414

  
2405 2415
static void numa_add(const char *optarg)
2406 2416
{
2407 2417
    char option[128];
......
5111 5121
            case QEMU_OPTION_boot:
5112 5122
                {
5113 5123
                    static const char * const params[] = {
5114
                        "order", NULL
5124
                        "order", "once", NULL
5115 5125
                    };
5116 5126
                    char buf[sizeof(boot_devices)];
5127
                    char *standard_boot_devices;
5117 5128
                    int legacy = 0;
5118 5129

  
5119 5130
                    if (!strchr(optarg, '=')) {
......
5131 5142
                        boot_devices_bitmap = parse_bootdevices(buf);
5132 5143
                        pstrcpy(boot_devices, sizeof(boot_devices), buf);
5133 5144
                    }
5145
                    if (!legacy) {
5146
                        if (get_param_value(buf, sizeof(buf),
5147
                                            "once", optarg)) {
5148
                            boot_devices_bitmap |= parse_bootdevices(buf);
5149
                            standard_boot_devices = qemu_strdup(boot_devices);
5150
                            pstrcpy(boot_devices, sizeof(boot_devices), buf);
5151
                            qemu_register_reset(restore_boot_devices,
5152
                                                standard_boot_devices);
5153
                        }
5154
                    }
5134 5155
                }
5135 5156
                break;
5136 5157
            case QEMU_OPTION_fda:

Also available in: Unified diff