From: Karel Zak Date: Thu, 1 Sep 2022 09:05:20 +0000 (+0200) Subject: lsblk: use strcoll() to sort X-Git-Tag: v2.39-rc1~539 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c62b21208058dd279b25fa2b32ebf02ad427a4f4;p=thirdparty%2Futil-linux.git lsblk: use strcoll() to sort It's more user-friendly to follow locale. Signed-off-by: Karel Zak --- 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); } /**