mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 15:06:34 -05:00
Extend the "smart" and "down" command to Windows
Now we are able to detect what low level device is associated to the high level volume.
This commit is contained in:
parent
162d049bb9
commit
14c8307ed4
8 changed files with 357 additions and 97 deletions
|
|
@ -968,17 +968,17 @@ void state_device(struct snapraid_state* state, int operation)
|
|||
}
|
||||
ferr("%s unsupported in this platform.\n", ope);
|
||||
} else {
|
||||
|
||||
#ifndef _WIN32
|
||||
if (operation == DEVICE_LIST) {
|
||||
for (i = tommy_list_head(&low); i != 0; i = i->next) {
|
||||
devinfo_t* devinfo = i->data;
|
||||
devinfo_t* parent = devinfo->parent;
|
||||
|
||||
#ifdef _WIN32
|
||||
printf("%" PRIu64 "\t%s\t%" PRIx64 "\t%s\t%s\n", devinfo->device, devinfo->file, parent->device, parent->file, parent->name);
|
||||
#else
|
||||
printf("%u:%u\t%s\t%u:%u\t%s\t%s\n", major(devinfo->device), minor(devinfo->device), devinfo->file, major(parent->device), minor(parent->device), parent->file, parent->name);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (operation == DEVICE_SMART)
|
||||
state_smart(state->opt.verbose, state->level + tommy_list_count(&state->disklist), &low);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue