summaryrefslogtreecommitdiff
path: root/libsmartcols/src
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2022-09-01 11:05:20 +0200
committerKarel Zak <kzak@redhat.com>2022-09-01 11:12:13 +0200
commitc62b21208058dd279b25fa2b32ebf02ad427a4f4 (patch)
treea318749a768b4cfc53d5daf46cddc3ab5c820b4c /libsmartcols/src
parent278e00b4cc96978b69b0e08bc1b8bbf6341a9e82 (diff)
downloadutil-linux-c62b21208058dd279b25fa2b32ebf02ad427a4f4.tar.gz
lsblk: use strcoll() to sort
It's more user-friendly to follow locale. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src')
-rw-r--r--libsmartcols/src/cell.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsmartcols/src/cell.c b/libsmartcols/src/cell.c
index 4cd6e5981..ca2a2b639 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);
}
/**