Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwan committed Nov 1, 2024
2 parents 2662dd1 + deaedf0 commit b7bb3ea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ch5/min_sysinfo/min_sysinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ MODULE_DESCRIPTION("LKP2E book:ch5/min_sysinfo: print some minimal system info")
MODULE_LICENSE("Dual MIT/GPL");
MODULE_VERSION("0.2");

int my_snprintf_lkp(char *buf, size_t maxsize, const char *fmt, ...);
void show_sizeof(void);
void llkd_sysinfo2(void);
void llkd_sysinfo(void);

/*
* Simple wrapper over the snprintf() - a bit more security-aware.
* Checks for and warns on overflow.
Expand Down
10 changes: 10 additions & 0 deletions ch5/modstacking/core_lkm.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
#define THE_ONE 0xfedface
MODULE_LICENSE("Dual MIT/GPL");

/* Declare prototypes for functions that aren't marked static,
* to prevent compiler warnings
*/
void llkd_sysinfo2(void);
#if (BITS_PER_LONG == 32)
u32 get_skey(int);
#else // 64-bit
u64 get_skey(int);
#endif

int exp_int = 200;
EXPORT_SYMBOL_GPL(exp_int);

Expand Down

0 comments on commit b7bb3ea

Please sign in to comment.