mirror of
https://github.com/ISpillMyDrink/OpenSuperClone.git
synced 2026-05-03 21:40:33 +00:00
Check if source drive is an SSD and recommend optimized settings.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
clone :
|
||||
{
|
||||
no_phase1 = false;
|
||||
no_phase2 = true;
|
||||
no_phase3 = false;
|
||||
no_phase4 = false;
|
||||
no_trim = true;
|
||||
no_scrape = false;
|
||||
no_divide1 = false;
|
||||
do_divide2 = false;
|
||||
read_bad_head = false;
|
||||
mark_bad_head = false;
|
||||
rebuild_assist = false;
|
||||
reverse = false;
|
||||
retries = 0;
|
||||
};
|
||||
@@ -1596,7 +1596,7 @@ void choose_source_ccc(void)
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_QUESTION,
|
||||
GTK_BUTTONS_YES_NO,
|
||||
_("Source was detected as %s.\n Load optimized settings for this drive?"), current_source_model_ccc);
|
||||
_("Source was detected as %s.\nLoad optimized settings for this drive?"), current_source_model_ccc);
|
||||
gint result = gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
gtk_widget_destroy(dialog);
|
||||
if (result == GTK_RESPONSE_YES)
|
||||
@@ -1607,6 +1607,25 @@ void choose_source_ccc(void)
|
||||
message_now_ccc(tempmessage_ccc);
|
||||
}
|
||||
}
|
||||
else if (identify_device_data_ccc.solid_state_drive)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
dialog = gtk_message_dialog_new(GTK_WINDOW(main_window_ccc),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_QUESTION,
|
||||
GTK_BUTTONS_YES_NO,
|
||||
_("Source was detected as a solid state drive.\nLoad optimized settings for SSD drives?"), current_source_model_ccc);
|
||||
gint result = gtk_dialog_run(GTK_DIALOG(dialog));
|
||||
gtk_widget_destroy(dialog);
|
||||
if (result == GTK_RESPONSE_YES)
|
||||
{
|
||||
char filename[1024];
|
||||
snprintf(filename, 1024, "%sdefault_ssd.cfg", template_directory);
|
||||
|
||||
snprintf(tempmessage_ccc, TEMP_MESSAGE_SIZE, _("Optimized settings loaded for SSD drives\n"));
|
||||
message_now_ccc(tempmessage_ccc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
use_rebuild_assist_ccc = use_rebuild_assist_bak;
|
||||
|
||||
@@ -151,6 +151,7 @@ struct
|
||||
bool udma_mode_4_selected;
|
||||
bool udma_mode_5_selected;
|
||||
bool udma_mode_6_selected;
|
||||
bool solid_state_drive;
|
||||
} identify_device_data_ccc;
|
||||
|
||||
struct
|
||||
|
||||
@@ -13742,6 +13742,7 @@ int process_source_ccc(void)
|
||||
identify_flags_ccc.ultra_dma_mode4_selected = get_flag_data_from_identify_ccc(88, 12, 12);
|
||||
identify_flags_ccc.ultra_dma_mode5_selected = get_flag_data_from_identify_ccc(88, 13, 13);
|
||||
identify_flags_ccc.ultra_dma_mode6_selected = get_flag_data_from_identify_ccc(88, 14, 14);
|
||||
identify_flags_ccc.solid_state_drive = get_flag_data_from_identify_ccc(217,0,0) == 1;
|
||||
identify_device_data_ccc.lba_supported = identify_flags_ccc.lba_supported;
|
||||
identify_device_data_ccc.extended_supported = identify_flags_ccc.extended_support;
|
||||
identify_device_data_ccc.drive_locked = identify_flags_ccc.drive_locked;
|
||||
@@ -13771,6 +13772,7 @@ int process_source_ccc(void)
|
||||
identify_device_data_ccc.udma_mode_4_selected = identify_flags_ccc.ultra_dma_mode4_selected;
|
||||
identify_device_data_ccc.udma_mode_5_selected = identify_flags_ccc.ultra_dma_mode5_selected;
|
||||
identify_device_data_ccc.udma_mode_6_selected = identify_flags_ccc.ultra_dma_mode6_selected;
|
||||
identify_device_data_ccc.solid_state_drive = identify_flags_ccc.solid_state_drive;
|
||||
// strncat(identify_device_raw_text_ccc, "#\n", sizeof(identify_device_raw_text_ccc) - strlen(identify_device_raw_text_ccc) - 1);
|
||||
// snprintf(tempstring, sizeof(tempstring), "# lba supported = %s\n", identify_flags_ccc.lba_supported ? "yes" : "no");
|
||||
// strncat(identify_device_raw_text_ccc, tempstring, sizeof(identify_device_raw_text_ccc) - strlen(identify_device_raw_text_ccc) - 1);
|
||||
|
||||
@@ -336,6 +336,7 @@ struct
|
||||
bool ultra_dma_mode4_selected; // word 88 bit 12
|
||||
bool ultra_dma_mode5_selected; // word 88 bit 13
|
||||
bool ultra_dma_mode6_selected; // word 88 bit 14
|
||||
bool solid_state_drive; // word 217 bit 0
|
||||
} identify_flags_ccc;
|
||||
|
||||
int do_command_line_ccc(void);
|
||||
|
||||
Reference in New Issue
Block a user