X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=psi.d%2Funame.psi;h=e5144da51026da4715322410c71a76c1c4ee4ec1;hp=25abfcbbf48709f85b809e5de4fe945f9f39487f;hb=8d1d1243a8a42b0046ac670808913b3bb06c994b;hpb=6bdeeb7b332a272617814a4358d51bb07c872407 diff --git a/psi.d/uname.psi b/psi.d/uname.psi index 25abfcb..e5144da 100644 --- a/psi.d/uname.psi +++ b/psi.d/uname.psi @@ -1,12 +1,13 @@ -extern int uname(struct utsname *u); +#include + function psi\uname(array &$u = NULL) : int { - let u = calloc(1, struct utsname); - return to_int(uname); - set $u = to_array(*u, + let name = calloc(1, psi\SIZEOF_STRUCT_UTSNAME); + return uname(name) as to_int(uname); + set $u = to_array(*name, to_string(sysname), to_string(nodename), to_string(release), to_string(version), to_string(machine), to_string(domainname)); -} \ No newline at end of file +}