- device_set_startup_properties_from_config(device);
- read_label_status = device_read_label(device);
- if (read_label_status != READ_LABEL_STATUS_SUCCESS) {
- char * errstr =
- g_english_strjoinv_and_free
- (g_flags_nick_to_strv(read_label_status,
- READ_LABEL_STATUS_FLAGS_TYPE), "or");
- error("Error reading volume label: %s.\n", errstr);
+ if (!device_configure(device, TRUE)) {
+ error("Error configuring device: %s",
+ device_error_or_status(device));
+ }
+
+ if (!set_restore_device_read_buffer_size(device, flags)) {
+ error("Error setting read block size: %s.\n", device_error_or_status(device));
+ }
+ device_status = device_read_label(device);
+ if (device_status != DEVICE_STATUS_SUCCESS) {
+ error("Error reading volume label: %s.\n", device_error_or_status(device));