bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: sdiff oddity


From: Bauke Jan Douma
Subject: Re: sdiff oddity
Date: Mon, 06 Nov 2006 23:58:01 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060909)

Andrew Benham wrote on 05-11-06 23:43:
I came across the following today.  I'm really puzzled.

Actually using sdiff on Fedora Core 5 (Linux i386).  RPM is
diffutils-2.8.1-15.2.1, sdiff --version reports:

sdiff (GNU diffutils) 2.8.1
Copyright (C) 2002 Free Software Foundation, Inc.


I was looking at master boot records and how GRUB works,
so I had two 512-byte sector images.  I used xxd to hex
dump each: the outputs are attached as MBR.hex and STAGE1.hex

Now, if you examine STAGE1.hex, you'll see that the string
'Floppy' appears at offset 0x1da, whereas in MBR.hex it
doesn't.  So I was looking for that string in the output
of 'sdiff MBR.hex STAGE1.hex' - but it doesn't appear.

In fact, the output is weird (it's attached as OUT). If you
look at the 0x1d0 line, the bytes "466c 6f70 7079" (being
'Floppy') are still there, but the char dump is bogus. And
the more one looks, the more bogus the char dump output is -
for example, at byte 0x19f the byte '00' is displayed as 'E'
in both the left and right side listings. And at byte 0x17f
the byte '47' (the 'G' in GRUB) is shown as a '.' in the
char dump output.  In fact, the char dump seems bogus from
the very first line.

'diff', 'diff -u', 'diff -c', 'diff -e', 'diff -f' all
work as expected.  'diff -y' doesn't.

This is so bizarre that I'm sure I'm doing something wrong.
But I can't see what.

sdiff --help | grep -w w


bjd






reply via email to

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