aboutsummaryrefslogtreecommitdiffstats
path: root/sys-utils/zramctl.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2025-06-26 13:47:00 +0200
committerKarel Zak <kzak@redhat.com>2025-06-26 13:49:37 +0200
commitf39ffccf2b9b8dcaaf2069346cc50735c2f0f95d (patch)
treea858ce55b377a85bc8adbe071f4c7091a262d2ff /sys-utils/zramctl.c
parentba5c614edc4407d5dacea6ce29c0a41f39883f02 (diff)
downloadutil-linux-f39ffccf2b9b8dcaaf2069346cc50735c2f0f95d.tar.gz
lib/strv: use ul_ prefix for strv functions
The functions are originally from systemd/udev, so it's possible that during static linking, they may collide with other systemd-based components. Fixes: https://github.com/util-linux/util-linux/issues/3626 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/zramctl.c')
-rw-r--r--sys-utils/zramctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c
index 175ad98d51..e9eea4d1e2 100644
--- a/sys-utils/zramctl.c
+++ b/sys-utils/zramctl.c
@@ -308,7 +308,7 @@ static void zram_unlock(struct zram *z) {
static void zram_reset_stat(struct zram *z)
{
if (z) {
- strv_free(z->mm_stat);
+ ul_strv_free(z->mm_stat);
z->mm_stat = NULL;
z->mm_stat_probed = 0;
}
@@ -525,11 +525,11 @@ static int get_mm_stat(struct zram *z,
if (!z->mm_stat && !z->mm_stat_probed) {
char *str = NULL;
if (ul_path_read_string(sysfs, &str, "mm_stat") > 0 && str) {
- z->mm_stat = strv_split(str, " ");
+ z->mm_stat = ul_strv_split(str, " ");
/* make sure kernel provides mm_stat as expected */
- if (strv_length(z->mm_stat) < ARRAY_SIZE(mm_stat_names)) {
- strv_free(z->mm_stat);
+ if (ul_strv_length(z->mm_stat) < ARRAY_SIZE(mm_stat_names)) {
+ ul_strv_free(z->mm_stat);
z->mm_stat = NULL;
}
}