]>
Commit | Line | Data |
---|---|---|
34e8f829 A |
1 | .Dd Nov 5, 2008 |
2 | .Dt GETHOSTUUID \&2 "Mac OS X System Calls Manual" | |
3 | .Os "Mac OS X" | |
4 | .Sh NAME | |
5 | .Nm gethostuuid | |
6 | .Nd return a unique identifier for the current machine | |
7 | .Sh SYNOPSIS | |
8 | .In unistd.h | |
9 | .Ft int | |
10 | .Fo gethostuuid | |
11 | .Fa "uuid_t id" | |
12 | .Fa "const struct timespec *wait" | |
13 | .Fc | |
14 | .Sh DESCRIPTION | |
15 | The | |
16 | .Fn gethostuuid | |
17 | function returns a 16-byte | |
18 | .Ft uuid_t | |
19 | specified by | |
20 | .Fa id , | |
21 | that uniquely identifies the current machine. | |
22 | Be aware that the hardware identifiers that | |
23 | .Fn gethostuuid | |
24 | uses to generate the UUID can themselves be modified. | |
25 | .Pp | |
26 | The | |
27 | .Fa wait | |
28 | argument is a pointer to a | |
29 | .Ft "struct timespec" | |
30 | that specifies the maximum time to wait for the result. | |
31 | Setting the | |
32 | .Fa tv_sec | |
33 | and | |
34 | .Fa tv_nsec | |
35 | fields to zero means to wait indefinitely until it completes. | |
36 | .Sh RETURN VALUES | |
37 | The | |
38 | .Fn gethostuuid | |
39 | function returns zero on success or -1 on error. | |
40 | .Sh ERRORS | |
41 | The | |
42 | .Fn gethostuuid | |
43 | functions fails if: | |
44 | .Bl -tag -width Er | |
45 | .It Bq Er EFAULT | |
46 | .Fa wait | |
47 | points to memory that is not a valid part of the process | |
48 | address space. | |
49 | .It Bq Er EWOULDBLOCK | |
50 | The | |
51 | .Fa wait | |
52 | timeout expired before the UUID could be obtained. | |
53 | .El | |
54 | .Sh SEE ALSO | |
55 | .Xr uuid 3 |