mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
2009-02-02 Christian Franke <franke@computer.org>
* lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
This commit is contained in:
1 parent
de3aa26079
commit
b4315fb069
2 files changed
+20
No files matched your search
@@ -1,3 +1,7 @@
|
||||
2009-02-02 Christian Franke <franke@computer.org>
|
||||
|
||||
* lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
|
||||
|
||||
2009-02-01 Felix Zielcke <fzielcke@z-51.de>
|
||||
|
||||
* INSTALL: Note that we now require at least autconf 2.59 and that LZO
|
||||
|
||||
@@ -61,6 +61,22 @@ hexdump (unsigned long bse, char *buf, int len)
|
||||
|
||||
grub_printf ("%s\n", line);
|
||||
|
||||
/* Print only first and last line if more than 3 lines are identical. */
|
||||
if (len >= 4 * 16
|
||||
&& ! grub_memcmp (buf, buf + 1 * 16, 16)
|
||||
&& ! grub_memcmp (buf, buf + 2 * 16, 16)
|
||||
&& ! grub_memcmp (buf, buf + 3 * 16, 16))
|
||||
{
|
||||
grub_printf ("*\n");
|
||||
do
|
||||
{
|
||||
bse += 16;
|
||||
buf += 16;
|
||||
len -= 16;
|
||||
}
|
||||
while (len >= 3 * 16 && ! grub_memcmp (buf, buf + 2 * 16, 16));
|
||||
}
|
||||
|
||||
bse += 16;
|
||||
buf += 16;
|
||||
len -= cnt;
|
||||
|
||||
Reference in new issue
Block a user