I am trying to print some stats about the hole struct in MINIX 3 kernel, I have modified the file alloc.c to print the number of holes in the list, number of iterations before a hole in the list was found and average size of the holes. I use printf to print to the console but it keeps printing type specifiers to the console screen. Here is a piece of my code:
printf("Total number of holes: %i\n", numHoles);
the output is:
Total number of holes: %i
It is printing the specifier as if it didn't recognize the type specifier.
I declared numHoles as int numHoles = 0;
and just incremented it in a loop structure. I have also added #include <stdio.h>
to the top of the file. What am I doing wrong?