Hi all, I'm in the middle of debugging an issue with the tar fs module, but thought sharing it with the list might make it go faster. With the attached tar file, and any tar file it seems, I am only able to see files which are children of root. So in this case, I can see /boot, but not /boot/grub or /boot/grub/test.cfg. This tar file was created with regular gnu tar.
I've added some debug print statements, and I can see that grub_cpio_find_file is returning all paths from the archive. So the problem would seem to be in grub_cpio_dir. I'm currently stuck trying to figure out how the big if in the while loop is supposed to work. For one, all code referencing the local variable "n" appears to be extraneous (if so, let's remove it). The local variable "p" seems to be used to get the next path component and also used to tell if the path is a directory. It appears that "(!prev) || (grub_strcmp (prev, name) != 0)" is always false, except the first time through the loop because prev == "boot" and name == "boot". I'm guessing there's something wrong with this condition, but I haven't completely figured out what its supposed to be doing at a high level. This piece of code is a little convoluted so it might be good to put some comments in to clarify what's going on. What's strange is that I thought I remembered this very case working a couple weeks ago. Can someone verify that they see this issue with this tar file before digging into the code? I won't be able to respond till after the weekend, but I thought I'd send this out if anyone else wanted to take a stab at it. Glenn
test.tar
Description: Unix tar archive
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel