summaryrefslogtreecommitdiffstats
path: root/src/analyze/analyze-compare-versions.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-05-17 16:28:45 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-05-19 09:07:34 +0200
commitbc012a3e913075d14ac39d33a090c5dcddce2e09 (patch)
treeaaca9e491b34bd4ca37edf12295b7bb04352827e /src/analyze/analyze-compare-versions.h
parentanalyze: allow verbs to return positive failure (diff)
downloadsystemd-bc012a3e913075d14ac39d33a090c5dcddce2e09.tar.xz
systemd-bc012a3e913075d14ac39d33a090c5dcddce2e09.zip
analyze: add compare-versions
The interface, output, and exit status convention are all taken directly from rpmdev-vercmp and dpkg --compare-versions. The implementation is different though. See test-string-util for a list of known cases where we compare strings incompatibly. The idea is that this string comparison function will be declared as "the" method to use for boot entry ordering in the specification and similar uses. Thus it's nice to allow users to compare strings.
Diffstat (limited to 'src/analyze/analyze-compare-versions.h')
-rw-r--r--src/analyze/analyze-compare-versions.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/analyze/analyze-compare-versions.h b/src/analyze/analyze-compare-versions.h
new file mode 100644
index 0000000000..ac90ede2f0
--- /dev/null
+++ b/src/analyze/analyze-compare-versions.h
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+int verb_compare_versions(int argc, char *argv[], void *userdata);