You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

50 lines
2.3 KiB

From b635f03ba218df6c184da4d53648b13241b6b07d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 8 Mar 2022 11:49:19 +0100
Subject: [PATCH] shared/install-printf: drop now-unused install_path_printf()
(cherry picked from commit 2cdd6bef9c940774d40046db9be41ea73cdb5d8e)
Related: #2082131
---
src/shared/install-printf.c | 4 ++--
src/shared/install-printf.h | 9 +--------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/shared/install-printf.c b/src/shared/install-printf.c
index 403d6013c1..6ff4198ac9 100644
--- a/src/shared/install-printf.c
+++ b/src/shared/install-printf.c
@@ -103,7 +103,7 @@ static int specifier_last_component(char specifier, const void *data, const char
return 0;
}
-int install_full_printf_internal(const UnitFileInstallInfo *i, const char *format, size_t max_length, const char *root, char **ret) {
+int install_name_printf(const UnitFileInstallInfo *i, const char *format, const char *root, char **ret) {
/* This is similar to unit_name_printf() */
const Specifier table[] = {
@@ -123,5 +123,5 @@ int install_full_printf_internal(const UnitFileInstallInfo *i, const char *forma
assert(format);
assert(ret);
- return specifier_printf(format, max_length, table, root, i, ret);
+ return specifier_printf(format, UNIT_NAME_MAX, table, root, i, ret);
}
diff --git a/src/shared/install-printf.h b/src/shared/install-printf.h
index af32acc2ca..5ca9406797 100644
--- a/src/shared/install-printf.h
+++ b/src/shared/install-printf.h
@@ -4,11 +4,4 @@
#include "install.h"
#include "unit-name.h"
-int install_full_printf_internal(const UnitFileInstallInfo *i, const char *format, size_t max_length, const char *root, char **ret);
-
-static inline int install_name_printf(const UnitFileInstallInfo *i, const char *format, const char *root, char **ret) {
- return install_full_printf_internal(i, format, UNIT_NAME_MAX, root, ret);
-}
-static inline int install_path_printf(const UnitFileInstallInfo *i, const char *format, const char *root, char **ret) {
- return install_full_printf_internal(i, format, PATH_MAX-1, root, ret);
-}
+int install_name_printf(const UnitFileInstallInfo *i, const char *format, const char *root, char **ret);