MCPcopy Create free account
hub / github.com/MhmRdd/NoHello / getKernelVersion

Function getKernelVersion

module/src/main/cpp/utils.cpp:302–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302static int getKernelVersion() {
303 struct utsname un{};
304 if (uname(&un) != 0) {
305 return 0;
306 }
307 int kmaj = 0, kmin = 0, kpatch = 0;
308 sscanf(un.release, "%d.%d.%d", &kmaj, &kmin, &kpatch);
309 return KERNEL_VERSION(kmaj, kmin, kpatch);
310}
311
312template <typename T>
313bool xwrite(int fd, const T& data) {

Callers 1

NoRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected