aboutsummaryrefslogtreecommitdiffstats
path: root/disk-utils/sfdisk.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2025-06-30 11:15:30 +0200
committerKarel Zak <kzak@redhat.com>2025-06-30 11:15:30 +0200
commitaa07db0ac1449627b3926669b052b07a1d3986ca (patch)
tree19eb1813174ced00af63f9d67340298cdb6f0c76 /disk-utils/sfdisk.c
parentf39ffccf2b9b8dcaaf2069346cc50735c2f0f95d (diff)
downloadutil-linux-aa07db0ac1449627b3926669b052b07a1d3986ca.tar.gz
lib/strutils: add ul_ prefix to startswith() and endswith()
Addresses: https://github.com/util-linux/util-linux/issues/3626 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/sfdisk.c')
-rw-r--r--disk-utils/sfdisk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index 7f2f3deea2..ad9bbb3cf8 100644
--- a/disk-utils/sfdisk.c
+++ b/disk-utils/sfdisk.c
@@ -1794,12 +1794,12 @@ static void refresh_prompt_buffer(struct sfdisk *sf, const char *devname,
if (!partname)
err(EXIT_FAILURE, _("failed to allocate partition name"));
- if (!sf->prompt || !startswith(sf->prompt, partname)) {
+ if (!sf->prompt || !ul_startswith(sf->prompt, partname)) {
free(sf->prompt);
xasprintf(&sf->prompt,"%s: ", partname);
}
free(partname);
- } else if (!sf->prompt || !startswith(sf->prompt, SFDISK_PROMPT)) {
+ } else if (!sf->prompt || !ul_startswith(sf->prompt, SFDISK_PROMPT)) {
free(sf->prompt);
sf->prompt = xstrdup(SFDISK_PROMPT);
}
@@ -2024,7 +2024,7 @@ static int command_fdisk(struct sfdisk *sf, int argc, char **argv)
if (!rc) { /* add partition */
if (!sf->interactive && !sf->quiet &&
- (!sf->prompt || startswith(sf->prompt, SFDISK_PROMPT))) {
+ (!sf->prompt || ul_startswith(sf->prompt, SFDISK_PROMPT))) {
refresh_prompt_buffer(sf, devname, next_partno, created);
fputs(sf->prompt, stdout);
}