Why cannot i patch "unix.patch" ?

According to FreeBSD Security Advisory, i download unix.patch and do the following:
Code:
>uname -a
FreeBSD mybsd.zsoft.com 8.2-RELEASE FreeBSD 8.2-RELEASE #2: Sat Feb 26 16:53:57 CST 2011     
root@mybsd.zsoft.com:/media/G/usr/obj/media/G/usr/src/sys/MYKERNEL  i386

>sudo patch < /media/E/RnD/freebsd/unix.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: sys/kern/uipc_usrreq.c
|===================================================================
|--- sys/kern/uipc_usrreq.c	(revision 225745)
|+++ sys/kern/uipc_usrreq.c	(working copy)
--------------------------
File to patch:
>

what does it mean?
 
"File to patch:" means it didn't find the file it wants to patch relative to the current directory.

Code:
+++ sys/kern/uipc_usrreq.c

It's looking for that file path relative to the current directory. So:
# cd /usr/src
# patch < /media/E/RnD/freebsd/unix.patch
 
BTW an alternate, shorter way maybe than the instruction(link) in the advisory (which I did not read), if one has kernel sources already, may be the paragraph in UPDATING (not the ports UPDATING ) that is titled "to just build a kernel when you know it won't mess you up..." after consulting
Code:
 uname -a
of course... after the patch has been applied.
 
Back
Top