From f15d3238ad0fa171a7a6568b01071628bce7ef4f Mon Sep 17 00:00:00 2001 From: Daniel Madej Date: Tue, 19 Nov 2024 09:48:16 +0100 Subject: [PATCH] Informative error for incorrect IO class 0 name Instead of generic 'Invalid input parameter' Signed-off-by: Daniel Madej --- casadm/cas_lib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/casadm/cas_lib.c b/casadm/cas_lib.c index 1686aebc0..dbdb83a0d 100644 --- a/casadm/cas_lib.c +++ b/casadm/cas_lib.c @@ -2327,6 +2327,10 @@ static inline int partition_get_line(CSVFILE *csv, } strncpy_s(cnfg->info[part_id].name, sizeof(cnfg->info[part_id].name), name, strnlen_s(name, sizeof(cnfg->info[part_id].name))); + if (0 == part_id && strcmp(name, "unclassified")) { + cas_printf(LOG_ERR, "IO class 0 must have the default name 'unclassified'\n"); + return FAILURE; + } /* Validate Priority*/ *error_col = part_csv_coll_prio;