# How to determine if a perforce patch has been mainlined?



## RuiDC (Oct 30, 2009)

I'd like to see if this Mount Root Patch has been included into 8-RC2 or mainlined:

http://p4db.freebsd.org/chv.cgi?CH=169183

How can i tell? 

If it has not been mainlined, how can I apply the changes to recompile a kernel?

RuiDC


----------



## john_doe (Oct 31, 2009)

RuiDC said:
			
		

> How can i tell?


Search revision history or check the code.





			
				RuiDC said:
			
		

> If it has not been mainlined, how can I apply the changes to recompile a kernel?


Try to generate diff using p4diff.sh

```
$ p4diff.sh 169183 >a.diff

$ diffstat a.diff
 cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c |    4 
 dev/pccbb/pccbb.c                                      |    9 -
 dev/pccbb/pccbb_pci.c                                  |    1 
 dev/pccbb/pccbbvar.h                                   |    1 
 dev/usb/controller/usb_controller.c                    |   20 --
 dev/usb/input/ukbd.c                                   |    4 
 dev/usb/serial/usb_serial.c                            |    5 
 dev/usb/usb_bus.h                                      |    1 
 geom/journal/g_journal.c                               |   15 -
 geom/journal/g_journal.h                               |    2 
 geom/mirror/g_mirror.c                                 |   23 --
 geom/mirror/g_mirror.h                                 |    2 
 geom/part/g_part.c                                     |    4 
 geom/raid3/g_raid3.c                                   |   26 ---
 geom/raid3/g_raid3.h                                   |    2 
 kern/kern_cons.c                                       |    7 
 kern/vfs_mount.c                                       |  144 ++++-------------
 sys/systm.h                                            |    7 
 18 files changed, 47 insertions(+), 230 deletions(-)
```
and apply it like this
`$ patch -sf -p7 -d /usr/src/sys -i /path/to/a.diff`


----------



## RuiDC (Oct 31, 2009)

*[SOLVED] How to determine if a perforce patch has been mainlined?*

Thanks for your comprehensive reply to the second part of my post. 

I've gone through one of the files: http://www.jp.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/vfs_mount.c

and seen that the change number is not listed.

Cheers,
RuiDC


----------

