Subject: Re: How to apply patches in RCSDIFF format?
To: Alicia da Conceicao <alicia@cyberstation.ca>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-i386
Date: 10/13/1999 15:05:24
> missing header for context diff at line 20 of patch
> can't find file to patch at input line 20
> Perhaps you should have used the -p or --strip option?
> The text leading up to this was:
> --------------------------
> | u_int cmd, u_int arg));
> --------------------------
This is correct!
> *** 232,237 ****
> --- 232,239 ----
> void ep_mii_sync __P((struct ep_softc *));
> void ep_mii_sendbits __P((struct ep_softc *, u_int32_t, int));
>
>
> + void ep_roadrunner_mii_enable __P((struct ep_softc *));
> +
> static int epbusyeeprom __P((struct ep_softc *));
> static inline void ep_reset_cmd __P((struct ep_softc *sc,
> u_int cmd, u_int arg));
This hunk is wrong. If you number the lines, you'll see there's an
extra line that crept in somewhere:
old new line
232 232 void ep_mii_sync __P((struct ep_softc *));
233 233 void ep_mii_sendbits __P((struct ep_softc *, u_int32_t, int));
234 234
235 235
236 + void ep_roadrunner_mii_enable __P((struct ep_softc *));
237 +
236 238 static int epbusyeeprom __P((struct ep_softc *));
237 239 static inline void ep_reset_cmd __P((struct ep_softc *sc,
238 240 u_int cmd, u_int arg));
...but the header says 232-237 and 232-239, not 232-238 and 232-240.
patch not unreasonably thinks the patch ends after line 237/239, since
that's what the line numbers in the hunk header tell it. Then it
expects the next line to begin another hunk, which it doesn't. So it
then tries to treat it as text leading up to another patch, but when it
sees a hunk begin at the next line it decides another patch begins, but
realizes it has no clue what file that patch is supposed to affect.
Comparing this hunk versus the file may offer some clues to what's
wrong. (Or it may not.) And in any case, whatever mangled this hunk
could well have affected other hunks too....
der Mouse
mouse@rodents.montreal.qc.ca
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B