Skip to content

Commit

Permalink
change user lib source file name
Browse files Browse the repository at this point in the history
  • Loading branch information
bmax committed Oct 11, 2023
1 parent 1784d14 commit c3f370e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion user/libkp.c → user/kpatch.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "libkp.h"
#include "kpatch.h"

#include <getopt.h>
#include <stdio.h>
Expand Down
4 changes: 2 additions & 2 deletions user/libkp.h → user/kpatch.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _KPU_LIBKP_H_
#define _KPU_LIBKP_H_
#ifndef _KPU_KPATCH_H_
#define _KPU_KPATCH_H_

#include "supercall.h"
#include "version"
Expand Down
6 changes: 5 additions & 1 deletion user/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,15 @@ int main(int argc, char **argv)
fprintf(stdout, "\n");
} else if (cmd == SUPERCALL_RESET_SU_CMD) {
const char *cmd = (const char *)arg1;
if (!cmd) {
fprintf(stderr, "Empty su cmd!\n");
return -1;
}
if (strnlen(cmd, 3) > 2) {
fprintf(stderr, "The string length of arg1 should not exceed two characters.\n");
return -1;
}
return sc_reset_su_cmd(key, cmd);
ret = sc_reset_su_cmd(key, cmd);
}
#endif
else {
Expand Down

0 comments on commit c3f370e

Please sign in to comment.