[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tar fs module appears to be broken

From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: Tar fs module appears to be broken
Date: Fri, 25 Nov 2011 14:12:50 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20111114 Icedove/3.1.16


On 19.11.2011 02:27, Glenn Washburn wrote:
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.


Grub-devel mailing list

Vladimir 'φ-coder/phcoder' Serbinenko

reply via email to

[Prev in Thread] Current Thread [Next in Thread]