Bug0002

Description
SK 2.05 dbtool fails to find inodes

It seems that dbtool is unable to re-open the image for inode walk after opening it for the file walk.

in dbtool.c we have code like this:

   1         img = img_open("raw", 1, (const char **) &argv[optind]);
   2         /* open image */
   3         fs = fs_open(img,0, fstype);
   4         if(!fs) RAISE(E_GENERIC,NULL,"Unable to open file system as %s",fstype);
   5 
   6         /* print filesystem info
   7          * This fills in the meta table
   8          */
   9         print_fsinfo(fs);
  10 
  11         /* directory walk, fills in the file table
  12          */
  13         fprintf(stderr, "Loading Directory Entries\n");
  14         fs->dent_walk(fs, fs->root_inum, f_flags, (FS_DENT_WALK_FN) print_dent, (char *)0);
  15 
  16         fs->close(fs);
  17         fs = NULL;
  18         img = img_open("raw", 1, (const char **) &argv[optind]);
  19         fs = fs_open(img,0, fstype);
  20         if(!fs) RAISE(E_GENERIC,NULL,"Unable to open file system as %s",fstype);

And for some reason the second fs_open fails, even though the first one passes. This could be a side effect of the hooker.


I was not able to get to the bottom of this. It may be a SK bug. I have devised a workaround by executing dbtool twice with different modes. The python code will not shell out to dbtool once for the file walk and once for dent walk.

This is kind of ugly but works for now.

Logged
2006-09-23
Logged By
210.11.145.235
Assigned to
Michael
Status
Closed

Get back to the BugIndex