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