Skip to content

Commit

Permalink
Informative error for incorrect IO class 0 name
Browse files Browse the repository at this point in the history
Instead of generic 'Invalid input parameter'

Signed-off-by: Daniel Madej <[email protected]>
  • Loading branch information
Deixx committed Nov 19, 2024
1 parent 306e682 commit 7cce829
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions casadm/cas_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7cce829

Please sign in to comment.