mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-21 07:26:29 -05:00
Add support for custom smartctl info options using a [info: ...] tag
This commit is contained in:
parent
7c9473027c
commit
b9d181d9cb
56 changed files with 631 additions and 221 deletions
|
|
@ -1051,6 +1051,7 @@ int state_device(struct snapraid_state* state, int operation, tommy_list* filter
|
|||
device_name_set(entry, disk->name, 0);
|
||||
pathcpy(entry->mount, sizeof(entry->mount), disk->dir);
|
||||
pathcpy(entry->smartctl, sizeof(entry->smartctl), disk->smartctl);
|
||||
pathcpy(entry->smartctl_info, sizeof(entry->smartctl_info), disk->smartctl_info);
|
||||
memcpy(entry->smartignore, disk->smartignore, sizeof(entry->smartignore));
|
||||
|
||||
tommy_list_insert_tail(&high, &entry->node, entry);
|
||||
|
|
@ -1078,6 +1079,7 @@ int state_device(struct snapraid_state* state, int operation, tommy_list* filter
|
|||
device_name_set(entry, lev_config_name(j), s);
|
||||
pathcpy(entry->mount, sizeof(entry->mount), state->parity[j].split_map[s].path);
|
||||
pathcpy(entry->smartctl, sizeof(entry->smartctl), state->parity[j].smartctl);
|
||||
pathcpy(entry->smartctl_info, sizeof(entry->smartctl_info), state->parity[j].smartctl_info);
|
||||
memcpy(entry->smartignore, state->parity[j].smartignore, sizeof(entry->smartignore));
|
||||
pathcut(entry->mount); /* remove the parity file */
|
||||
|
||||
|
|
@ -1109,7 +1111,8 @@ int state_device(struct snapraid_state* state, int operation, tommy_list* filter
|
|||
device_name_set(entry, extra->name, 0);
|
||||
pathcpy(entry->mount, sizeof(entry->mount), extra->dir);
|
||||
pathcpy(entry->smartctl, sizeof(entry->smartctl), extra->smartctl);
|
||||
memcpy(entry->smartignore, extra->smartignore, sizeof(extra->smartignore));
|
||||
pathcpy(entry->smartctl_info, sizeof(entry->smartctl_info), extra->smartctl_info);
|
||||
memcpy(entry->smartignore, extra->smartignore, sizeof(entry->smartignore));
|
||||
|
||||
tommy_list_insert_tail(&high, &entry->node, entry);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue