shithub: fuzz

Download patch

ref: c9c14da95ee6020e4700689ba1ab94d6975374da
parent: 5265706035146d7a040eb68add7cbfc2e0f00a80
author: seh <seh@localhost>
date: Sat Nov 10 13:05:00 EST 2018

fix build issues

--- a/fuzz.h
+++ b/fuzz.h
@@ -1,5 +1,6 @@
 #ifndef FUZZ_H
 #define FUZZ_H
+
 #include <u.h>
 #include <libc.h>
 #include "list.h"
@@ -9,6 +10,9 @@
 #define NCALLS 66
 #define NTYPES 4
 
+// Global variables
+extern int logfd;
+
 /* 
 For full list of syscalls:
 
@@ -130,9 +134,11 @@
 // input.c
 void	fuzz(caller*);
 void	hjsync(void);
+void	log_call(caller*);
 
 // inlist.c
 List*	mkinlist(List*, call);
+
 
 // list.c → See list.h
 
--- a/inlist.c
+++ b/inlist.c
@@ -23,7 +23,7 @@
 	case sc_chdir	:
 	 
 	case sc_close	:
-	 
+
 	case sc_create	:
 	 
 	case sc_dup	:
@@ -141,8 +141,4 @@
 	default:
 		return nil;
 	}
-
-
-
-	return l;
 }
--- a/input.c
+++ b/input.c
@@ -20,14 +20,9 @@
 
 			// mutate the input
 			int fd;
-			mut_int(&fd);
-			mut_int(&(((sc->List)->root)->dat));
-			
-			// store arguments in temp values for readability
-			int fd = (((sc->List)->root)->dat);
 
 			// log the variables
-			log_call(&sc);
+			log_call(sc);
 
 			// sync the disk
 			hjsync();
@@ -108,7 +103,7 @@
 
 
 	int x;
-	for (x; x < ((sc->List)->size); x++) {
+	for (x; x < sc->inputs.size; x++) {
 	
 	}
 }
--- a/main.c
+++ b/main.c
@@ -3,7 +3,6 @@
 // Global variables are bad
 int logfd = -1; // fd of the log file, initialized in main
 
-
 // Commandline usage warning
 void
 usage(void)