From c62b21208058dd279b25fa2b32ebf02ad427a4f4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 1 Sep 2022 11:05:20 +0200 Subject: [PATCH] lsblk: use strcoll() to sort It's more user-friendly to follow locale. Signed-off-by: Karel Zak --- libsmartcols/src/cell.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsmartcols/src/cell.c b/libsmartcols/src/cell.c index 4cd6e59811..ca2a2b6394 100644 --- a/libsmartcols/src/cell.c +++ b/libsmartcols/src/cell.c @@ -129,10 +129,10 @@ void *scols_cell_get_userdata(struct libscols_cell *ce) * @b: pointer to cell * @data: unused pointer to private data (defined by API) * - * Compares cells data by strcmp(). The function is designed for + * Compares cells data by strcoll(). The function is designed for * scols_column_set_cmpfunc() and scols_sort_table(). * - * Returns: follows strcmp() return values. + * Returns: follows strcoll() return values. */ int scols_cmpstr_cells(struct libscols_cell *a, struct libscols_cell *b, @@ -152,7 +152,7 @@ int scols_cmpstr_cells(struct libscols_cell *a, return -1; if (bdata == NULL) return 1; - return strcmp(adata, bdata); + return strcoll(adata, bdata); } /** -- 2.47.3