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