Debian Codegraph @

upstream/debian-unstable/man3/sd_bus_get_name_machine_id.3

raw
1 '\" t
2 .TH "SD_BUS_GET_NAME_MACHINE_ID" "3" "" "systemd 261~rc3" "sd_bus_get_name_machine_id"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 sd_bus_get_name_machine_id \- Retrieve a bus client\*(Aqs machine identity
24 .SH "SYNOPSIS"
25 .sp
26 .ft B
27 .nf
28 #include <systemd/sd\-bus\&.h>
29 .fi
30 .ft
31 .HP \w'int\ sd_bus_get_name_machine_id('u
32 .BI "int sd_bus_get_name_machine_id(sd_bus\ *" "bus" ", const\ char\ *" "name" ", sd_id128_t\ *" "machine" ");"
33 .SH "DESCRIPTION"
34 .PP
35 \fBsd_bus_get_name_machine_id()\fR
36 retrieves the D\-Bus machine identity of the machine that the bus client identified by
37 \fIname\fR
38 is running on\&. Internally, it calls the
39 \fBGetMachineId\fR
40 method of the
41 \fBorg\&.freedesktop\&.DBus\&.Peer\fR
42 interface\&. The D\-Bus machine identity is a 128\-bit UUID\&. On Linux systems running systemd, this corresponds to the contents of
43 /etc/machine\-id\&. On success, the machine identity is stored in
44 \fImachine\fR\&.
45 .SH "RETURN VALUE"
46 .PP
47 On success, this function returns a non\-negative integer\&. On failure, it returns a negative errno\-style error code\&.
48 .SS "Errors"
49 .PP
50 Returned errors may indicate the following problems:
51 .PP
52 \fB\-EINVAL\fR
53 .RS 4
54 An argument is invalid\&.
55 .RE
56 .PP
57 \fB\-ENOPKG\fR
58 .RS 4
59 The bus cannot be resolved\&.
60 .RE
61 .PP
62 \fB\-ECHILD\fR
63 .RS 4
64 The bus was created in a different process, library or module instance\&.
65 .RE
66 .PP
67 \fB\-ENOMEM\fR
68 .RS 4
69 Memory allocation failed\&.
70 .RE
71 .SH "NOTES"
72 .PP
73 Functions described here are available as a shared library, which can be compiled against and linked to with the
74 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
75 file\&.
76 .PP
77 The code described here uses
78 \fBgetenv\fR(3), which is declared to be not multi\-thread\-safe\&. This means that the code calling the functions described here must not call
79 \fBsetenv\fR(3)
80 from a parallel thread\&. It is recommended to only do calls to
81 \fBsetenv()\fR
82 from an early phase of the program when no other threads have been started\&.
83 .SH "HISTORY"
84 .PP
85 \fBsd_bus_get_name_machine_id()\fR
86 was added in version 221\&.
87 .SH "SEE ALSO"
88 .PP
89 \fBsystemd\fR(1), \fBsd-bus\fR(3)