systemd: drop systemd path helpers from "nm-sd-utils-shared.h" adapter header

They are now unused, and replaced by nm_path*() utils in glib-aux (which
are forks of the systemd code).
This commit is contained in:
Thomas Haller
2022-04-12 16:24:24 +02:00
parent f4c7b5b7b7
commit 202d9c36c3
3 changed files with 0 additions and 64 deletions

View File

@@ -98,41 +98,6 @@ test_sd_event(void)
/*****************************************************************************/
static void
test_path_equal(void)
{
#define _path_equal_check(path, expected) \
G_STMT_START \
{ \
const char *_path0 = (path); \
const char *_expected = (expected); \
gs_free char *_path = g_strdup(_path0); \
const char *_path_result; \
\
_path_result = nm_sd_utils_path_simplify(_path); \
g_assert(_path_result == _path); \
g_assert_cmpstr(_path, ==, _expected); \
} \
G_STMT_END
_path_equal_check("", "");
_path_equal_check(".", ".");
_path_equal_check("..", "..");
_path_equal_check("/..", "/..");
_path_equal_check("//..", "/..");
_path_equal_check("/.", "/");
_path_equal_check("./", ".");
_path_equal_check("./.", ".");
_path_equal_check(".///.", ".");
_path_equal_check(".///./", ".");
_path_equal_check(".////", ".");
_path_equal_check("//..//foo/", "/../foo");
_path_equal_check("///foo//./bar/.", "/foo/bar");
_path_equal_check(".//./foo//./bar/.", "foo/bar");
}
/*****************************************************************************/
NMTST_DEFINE();
int
@@ -142,7 +107,6 @@ main(int argc, char **argv)
g_test_add_func("/systemd/lldp/create", test_lldp_create);
g_test_add_func("/systemd/sd-event", test_sd_event);
g_test_add_func("/systemd/test_path_equal", test_path_equal);
return g_test_run();
}

View File

@@ -21,26 +21,6 @@ const bool mempool_use_allowed = true;
/*****************************************************************************/
gboolean
nm_sd_utils_path_equal(const char *a, const char *b)
{
return path_equal(a, b);
}
char *
nm_sd_utils_path_simplify(char *path)
{
return path_simplify(path);
}
const char *
nm_sd_utils_path_startswith(const char *path, const char *prefix)
{
return path_startswith(path, prefix);
}
/*****************************************************************************/
int
nm_sd_dns_name_to_wire_format(const char *domain, guint8 *buffer, size_t len, gboolean canonical)
{

View File

@@ -8,14 +8,6 @@
/*****************************************************************************/
gboolean nm_sd_utils_path_equal(const char *a, const char *b);
char *nm_sd_utils_path_simplify(char *path);
const char *nm_sd_utils_path_startswith(const char *path, const char *prefix);
/*****************************************************************************/
int
nm_sd_dns_name_to_wire_format(const char *domain, guint8 *buffer, size_t len, gboolean canonical);