diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-09-08 17:25:16 +0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-09-08 17:25:16 +0300 |
commit | c7a77657ffe00b6d52a0c7e3d29f4fcf8537af5f (patch) | |
tree | 1ac05a5c37df435c164736b684903a926a733b8d /src/pulsecore/core-util.c | |
parent | 6b034f5bfd4a69d5795f2292014f902fd450a8a4 (diff) | |
parent | 821dc1797faa903618c7585d3c053fd7ae6e93db (diff) |
Merge branch 'master' into master-tx
Diffstat (limited to 'src/pulsecore/core-util.c')
-rw-r--r-- | src/pulsecore/core-util.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index ad00f4f4..3e5ea492 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -42,6 +42,7 @@ #include <dirent.h> #include <regex.h> #include <langinfo.h> +#include <sys/utsname.h> #ifdef HAVE_STRTOF_L #include <locale.h> @@ -2445,5 +2446,12 @@ char *pa_machine_id(void) { /* If no hostname was set we use the POSIX hostid. It's usually * the IPv4 address. Mit not be that stable. */ return pa_sprintf_malloc("%08lx", (unsigned long) gethostid); +} + +char *pa_uname_string(void) { + struct utsname u; + + pa_assert_se(uname(&u) == 0); + return pa_sprintf_malloc("%s %s %s %s", u.sysname, u.machine, u.release, u.version); } |