mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-27 03:21:32 +03:00
787f78b6a1
Moving them out makes it easier to run them through a compiler, use automatic indentation, and opens the possibility to provide a download link in the future. I verified that all examples compile cleanly. (2-space indentation is used because the examples are already significantly indented in the man page, and we need to keep them narrow so that they display well on standard terminals.)
12 lines
353 B
C
12 lines
353 B
C
#include <stdio.h>
|
|
#include <systemd/sd-id128.h>
|
|
|
|
#define OUR_APPLICATION_ID SD_ID128_MAKE(c2,73,27,73,23,db,45,4e,a6,3b,b9,6e,79,b5,3e,97)
|
|
|
|
int main(int argc, char *argv[]) {
|
|
sd_id128_t id;
|
|
sd_id128_get_machine_app_specific(OUR_APPLICATION_ID, &id);
|
|
printf("Our application ID: " SD_ID128_FORMAT_STR "\n", SD_ID128_FORMAT_VAL(id));
|
|
return 0;
|
|
}
|