When logging device attributes, also provide the split information

This commit is contained in:
Andrea Mazzoleni 2025-12-21 15:55:52 +01:00
parent bb3aae2f40
commit efcdfb9118
8 changed files with 119 additions and 101 deletions

View file

@ -504,7 +504,7 @@ int randomize(void* ptr, size_t size);
*/
struct devinfo_struct {
uint64_t device; /**< Device ID. */
char name[PATH_MAX]; /**< Name of the disk. */
char name[PATH_MAX]; /**< Name of the disk combined with the split index if any */
char mount[PATH_MAX]; /**< Mount point or other contained directory. */
char smartctl[PATH_MAX]; /**< Options for smartctl. */
int smartignore[SMART_IGNORE_MAX]; /**< Attribues to ignore */
@ -526,6 +526,8 @@ struct devinfo_struct {
};
typedef struct devinfo_struct devinfo_t;
void device_name_set(devinfo_t* dev, const char* name, int index);
#define DEVICE_LIST 0
#define DEVICE_DOWN 1
#define DEVICE_UP 2