grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* Tar fs module appears to be broken
@ 2011-11-19  1:27 Glenn Washburn
  2011-11-25 13:12 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 2+ messages in thread
From: Glenn Washburn @ 2011-11-19  1:27 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

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

[-- Attachment #2: test.tar --]
[-- Type: application/x-tar, Size: 10240 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Tar fs module appears to be broken
  2011-11-19  1:27 Tar fs module appears to be broken Glenn Washburn
@ 2011-11-25 13:12 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-11-25 13:12 UTC (permalink / raw)
  To: grub-devel

Fixed

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.
>
> Glenn
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-25 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-19  1:27 Tar fs module appears to be broken Glenn Washburn
2011-11-25 13:12 ` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).