Okay...perhaps someone can assist me on this little problem.

        I have this tulip.c file which I need to patch with a new patch file..but
it seems it just fails everytime, no matter how it matches.  So... anyone
can assist on this?  Here is the patch and the target area.  It also have a
problem with the 2 parts of the ide.c patch as well.  But everything else is
patched cleanly without any problems after fixing the patch to fit after the
whole set of patches that is setup with the kernel.


Patch:
diff -N -r -u linux-2.2.17/drivers/net/tulip.c linux/drivers/net/tulip.c
--- linux-2.2.17/drivers/net/tulip.c    Wed Sep  6 19:46:56 2000
+++ linux/drivers/net/tulip.c   Tue Nov 14 17:33:39 2000
@@ -3038,4 +3038,9 @@
        }
        return 0;
-    case SIOCSMIIREG:       /* Write the specified MII register */
-       if (!capable(CAP_NET_ADMIN))
+    case SIOCSMIIREG:       /* Write the specified MII register */
+       if (!capable(CAP_NET_ADMIN)) {
+#ifdef CONFIG_LIDS
+           lids_security_alert("CAP_NET_ADMIN violation: try to set %s MII
register",dev->name);
+#endif
+           return -EPERM;
+       }
~

Original:
                     data[3] |= ((csr14>>9)&0x07C0);     <----- Line 3030
                break;
            }
            case 5: data[3] = csr12 >> 16; break;
            default: data[3] = 0; break;
            }
        } else {
            data[3] = mdio_read(dev, data[0] & 0x1f, regnum);
        }
        return 0;
    case SIOCSMIIREG:       /* Write the specified MII register */
        if (!capable(CAP_NET_ADMIN))
            return -EPERM;
        if (regnum & ~0x1f)
            return -EINVAL;
        if (data[0] == phy) {
            switch (regnum) {
            case 0: tp->full_duplex = ((data[2] & 0x1100) == 0x0100); break;
            case 4: tp->mii_advertise = data[2]; break;   <----- Line 3048

        So...from what I can see.. it should patch cleanly, but it doesn't.  I keep
getting this error as follows:
[root@qwikhost linux]# patch -p1 < test
patching file drivers/net/tulip.c
Hunk #1 FAILED at 3038.
1 out of 1 hunk FAILED -- saving rejects to file drivers/net/tulip.c.rej

        I also included the entire patch file which is to be intregrated into the
2.2.17-src.mdk.rpm file which to produce the LIDS-Enchanced Kernels of
Mandrake, which I like to use.  If anyone can get those three areas fixed,
which it keep failing, then I appreciate it.

        Chmouel Boudjnah, I have included the modified patch for the 2.2.17 tree
which you have made extensive changes and patches to it.  It all patches
cleanly except for three areas.  If you can check them out and see what to
be done to make it work, then let me know so I can continue on it and then
continue the LIDS intregration and perhaps submit back to you the final
version along with the LIDS setup.

----------------------------------------------
Linux Administrator & Consultant
Russell "Elik" Rademacher

lids-0.9.11-2.2.17.patch.bz2

Reply via email to