Hi,

the question is now:

Is it worth to correct an error text which i cannot get to show up ?


Vladimir 'phcoder' Serbinenko wrote:
> grub-fstest IMAGE ls -- -l

  $ gunzip <tests/iso9660_early_ce.iso.gz >/tmp/iso9660_early_ce.iso
  $ ./grub-fstest /tmp/iso9660_early_ce.iso ls -- -l
  ...
  Device loop0: Filesystem type iso9660 - Label `ISOIMAGE' -
  Last modification time 2023-03-04 16:28:35 Saturday,
  UUID 2023-03-04-16-28-35-00 - Sector size 512B - Total size 68KiB
  ...

Now zeroizing the modification date (offset 830 in PVD at offset 32768):

  $ dd if=/dev/zero of=/tmp/iso9660_early_ce.iso conv=notrunc bs=1 count=17 
seek=33598

  $ ./grub-fstest /tmp/iso9660_early_ce.iso ls -- -l
  ...
  Device loop0: Filesystem type iso9660 - Label `ISOIMAGE' -
  Sector size 512B - Total size 68KiB
  ...
  $

Well, it did not crash and there is no UUID. But i don't see the error
message either.

Switching to the branch with my proposed error text improvements of
grub-fstest ...
Still nothing to see. Obviously grub_errno is not set after function
execute_command of grub-fstest.c.

I checked that a bad ISO still causes a visible error message

  $ /grub-fstest /tmp/iso9660_ce_loop2.iso ls / -- -l
  ls : GRUB error 9 with message 'suspecting endless CE loop'
  ./grub-fstest: error: encountered 1 error during command execution.
  $

I also zeroized creation date at offset 32768+813 of the original ISO and
verified that grub-fstest still shows an UUID.
So the only thing i could prove by my test run is that indeed GRUB depends
on ISO 9660 modification time for its UUID production.

I failed to hack the function grub_error in grub-core/kern/err.c so that
it shows grub_errmsg to me. Neither fprintf(3) nor write(2) seem in reach.
The attempt to #include /usr/include/stdio.h or /usr/include/unistd.h
fails with not found sub-header files.


Have a nice day :)

Thomas


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to