Hi,
I'm working on an assignment that measures internal fragmentation of files (and size distribution) starting at a base directory. So far, I'm just working with a single directory gathering statistics, and everything seems to be working out great, except, for some reason, when i added a new integer variable, it changed to the following:
Scanning Directory '.'
Retrieving info about: '.'
Segmentation fault
but initially looked like:
Scanning Directory '.'
Retrieving info about: '.' done.
Retrieving info about: '..' done.
Retrieving info about: 'main.c'
Block size: 2; Category: 1; done.
Percentage of files 1 block or less = 66%
Illegal instruction
Sometimes it displays at the end of the longer one a Segfault as well, but it's appearing after everything has executed.
Any idea why this is happening? I'm working with the dirent struct and using readdir() and lstat() to get file information (requirements for the assignment)
I ran it through gdb, but it just gives me a hex value and doesn't tell me where the segfault is occurring...
thanks,
Phlook