summary refs log tree commit diff
path: root/src/systemd/nm-sd-utils-core.c
blob: 4057c70a9050b537cbdffbd30b730ba3cd213b44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// SPDX-License-Identifier: LGPL-2.1+
/*
 * Copyright (C) 2018 Red Hat, Inc.
 */

#include "nm-default.h"

#include "nm-sd-utils-core.h"

#include "nm-core-internal.h"

#include "nm-sd-adapt-core.h"

#include "sd-id128.h"

/*****************************************************************************/

NMUuid *
nm_sd_utils_id128_get_machine (NMUuid *out_uuid)
{
	g_assert (out_uuid);

	G_STATIC_ASSERT_EXPR (sizeof (*out_uuid) == sizeof (sd_id128_t));
	if (sd_id128_get_machine ((sd_id128_t *) out_uuid) < 0)
		return NULL;
	return out_uuid;
}