Skip to content

Commit

Permalink
Merge pull request #1 from bankai671/master
Browse files Browse the repository at this point in the history
refactor: add tabulation
  • Loading branch information
4etell authored Jul 17, 2023
2 parents 3eb2441 + deafc94 commit cb2dbf1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/device.h>
#include<linux/slab.h>
#include<linux/uaccess.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/ioctl.h>
#include<linux/proc_fs.h>

#include <linux/proc_fs.h>
#include <linux/pid.h>
#include <linux/sched.h>
#include <linux/sched/task_stack.h>
Expand Down
6 changes: 3 additions & 3 deletions usr.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include <stdlib.h>
#include <errno.h>

void info(){
void info() {
fprintf(stderr, "Usage: ./usr struct_id PID\n Avaliable struct_id:\n 0 - pt_regs \n 1 - task_struct\n");
}

int main(int argc, char *argv[]){
int main(int argc, char *argv[]) {
if (argc != 3) {
info();
return 0;
Expand All @@ -22,7 +22,7 @@ int main(int argc, char *argv[]){
long PID = strtol(argv[2], &p, 10);


if (structure_ID !=0 && structure_ID !=1){
if (structure_ID !=0 && structure_ID !=1) {
fprintf(stderr, "struct_id is not supported.\n");
info();
return 0;
Expand Down

0 comments on commit cb2dbf1

Please sign in to comment.