static UI_CALLBACK(add2fliplist2) { fliplist_set_current(((struct cb_data_t *)UI_MENU_CB_PARAM)->unit, (char *) ((struct cb_data_t *)UI_MENU_CB_PARAM)->data); fliplist_add_image(((struct cb_data_t *)UI_MENU_CB_PARAM)->unit); uifliplist_update_menus(((struct cb_data_t *)UI_MENU_CB_PARAM)->unit, ((struct cb_data_t *)UI_MENU_CB_PARAM)->unit); }
static int file_system_attach_disk_internal(unsigned int unit, const char *filename) { vdrive_t *vdrive; vdrive = file_system_get_vdrive(unit); /* FIXME: Is this clever? */ vdrive_device_setup(vdrive, unit); serial_device_type_set(SERIAL_DEVICE_VIRT, unit); if (attach_disk_image(&(vdrive->image), vdrive, filename, unit, file_system_device_enabled[unit - 8]) < 0) { return -1; } else { file_system_set_serial_hooks(unit, 0); fliplist_set_current(unit, filename); ui_display_drive_current_image(unit - 8, filename); } event_record_attach_image(unit, filename, vdrive->image->read_only); return 0; }