pre-proc: use uname() syscall instead of invoking uname
commit6a28f0fb3e98bc756475efc96f7da0919c3ce534
authorAndrey Albershteyn <aalbersh@redhat.com>
Fri, 10 May 2024 15:12:14 +0000 (10 17:12 +0200)
committerDan Carpenter <dan.carpenter@linaro.org>
Fri, 10 May 2024 17:48:56 +0000 (10 20:48 +0300)
tree79114fb9c1450b47ef6a7f263c3feb430851448d
parentff1cc4d453ffeddf3cf3dc031c5b129eefbf3e2c
pre-proc: use uname() syscall instead of invoking uname

Not all systems have uname at /bin/uname and using uname() directly
seems to be a better case than spawning shell.

The utsname.sysname seems to be returning different name ("Linux"
instead of "GNU/Linux") but this doesn't seem to be a problem.
"uname -o" does seem to be returning HOST_OPERATING_SYSTEM and
utsname.sysname being defined as KERNEL_NAME.

Signed-off-by: Andrey Albersteyn <aalbersh@redhat.com>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
pre-process.c