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