Mark Munro wrote:
> 
> Thanks Matthew
> But unfortunately ended up with this:
> 
> patching file drivers/ide/via82cxxx.c
> Hunk #1 FAILED at 1.
> Hunk #2 FAILED at 68.
> Hunk #3 FAILED at 126.
> Hunk #4 FAILED at 377.
> 4 out of 4 hunks FAILED -- saving rejects to file
> drivers/ide/via82cxxx.c.rej
> patching file include/linux/pci_ids.h
> Hunk #1 FAILED at 981.
> 1 out of 1 hunk FAILED -- saving rejects to file
> include/linux/pci_ids.h.rej
> 
> fyi
> My current kernel is 2.4.19
> Any more information needed?

These errors mean that your versions of the files via82cxxx.c and
pci_ids.h are different enough to the ones the diff was created against,
that patch can't figure out where to make the changes.

The diff itself is not very complicated... you could probably just make
the changes manually. Make backups of the files before you start though.

Understanding diff files is easy, especially with diff files created in
'unified' mode, as this one is.

Lines starting with '-' are to be deleted. Lines starting with '+' are
to be added. Whenever a line is changed, it will be represented in the
diff by a deletion followed by an addition. This section is an example
of that:

 -       via_print("Driver Version:                     3.34");
 +       via_print("Driver Version:                     3.35");


Moved lines are similar, but will not appear adjacent to each other:

 -       { "vt8235",     PCI_DEVICE_ID_VIA_8235,     0x00, 0x2f...
  #endif
 +       { "vt8235",     PCI_DEVICE_ID_VIA_8235,     0x00, 0x2f...

(I've trimmed these lines in the interest of keeping them < 72 chars so
they don't wrap)


Lines with no '-' or '+' are existing lines that shouldn't be modified.
They are in the diff file to give context. It would be these lines that
cause your patch command to fail -- they must appear in the file exactly
as they are in the diff, otherwise patch will not recognise them. You
might be able to spot why patch failed when you make the changes
yourself (this information is also what patch puts into the .rej file)

There's only two other code changes to worry about, so I'll leave them
up to you. Most of the diff is comment changes.

The @@-bracketed parts indicate line numbers. Don't worry too much about
them, although they are useful in finding the correct line to change if
you are manually applying a diff. The diff section after each "@@ ...
@@" line is the 'hunk' your error message refers to.

Matthew
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to