Skip to content

Commit

Permalink
detect (print) kernel version at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Oct 31, 2023
1 parent 52c460c commit f75a357
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hcxdumptool.c
Original file line number Diff line number Diff line change
Expand Up @@ -4465,8 +4465,10 @@ return true;
__attribute__ ((noreturn))
static inline void version(char *eigenname)
{
fprintf(stdout, "%s %s (C) %s ZeroBeat\n", eigenname, VERSION_TAG, VERSION_YEAR);
struct utsname utsbuffer;

fprintf(stdout, "%s %s (C) %s ZeroBeat\n", eigenname, VERSION_TAG, VERSION_YEAR);
if(uname(&utsbuffer) == 0) fprintf(stdout, "running on Linux kernel %s\n", utsbuffer.release);
#if defined (__GNUC__)
fprintf(stdout, "compiled by gcc %d.%d.%d\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
#else
Expand Down

0 comments on commit f75a357

Please sign in to comment.