- new->action_fd = sysfs_open(new->info.sys_name, NULL, "sync_action");
- new->info.state_fd = sysfs_open(new->info.sys_name, NULL, "array_state");
- new->resync_start_fd = sysfs_open(new->info.sys_name, NULL, "resync_start");
- new->metadata_fd = sysfs_open(new->info.sys_name, NULL, "metadata_version");
- new->sync_completed_fd = sysfs_open(new->info.sys_name, NULL, "sync_completed");
- dprintf("%s: inst: %d action: %d state: %d\n", __func__, atoi(inst),
+ new->action_fd = sysfs_open2(new->info.sys_name, NULL, "sync_action");
+ new->info.state_fd = sysfs_open2(new->info.sys_name, NULL, "array_state");
+ new->resync_start_fd = sysfs_open2(new->info.sys_name, NULL, "resync_start");
+ new->metadata_fd = sysfs_open2(new->info.sys_name, NULL, "metadata_version");
+ new->sync_completed_fd = sysfs_open2(new->info.sys_name, NULL, "sync_completed");
+ new->safe_mode_delay_fd = sysfs_open2(new->info.sys_name, NULL,
+ "safe_mode_delay");
+
+ dprintf("inst: %s action: %d state: %d\n", inst,