1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

efi-api: use string_replace_char()

This commit is contained in:
Yu Watanabe 2022-04-20 02:23:11 +09:00
parent 9dbfcaf229
commit 2a86ed67ed
2 changed files with 4 additions and 9 deletions

View File

@ -546,11 +546,3 @@ bool efi_has_tpm2(void) {
}
#endif
char *efi_tilt_backslashes(char *s) {
for (char *p = s; *p; p++)
if (*p == '\\')
*p = '/';
return s;
}

View File

@ -3,6 +3,7 @@
#include "efivars-fundamental.h"
#include "efivars.h"
#include "string-util.h"
/* Various calls for interfacing with EFI variables from the official UEFI specs. */
@ -65,4 +66,6 @@ static inline bool efi_has_tpm2(void) {
#endif
char *efi_tilt_backslashes(char *s);
static inline char *efi_tilt_backslashes(char *s) {
return string_replace_char(s, '\\', '/');
}