Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 09-24-2008, 07:54 AM   #1
Registered: Jan 2005
Posts: 54

Rep: Reputation: 15

I have a kernel patch for RHEL5 and want to apply it to the kernel source of RHEL4. The patch is called "x2v-x32-rhel.patch" and contains the following code:

diff -pruN linux-2.6.18.i686/drivers/xen/core/xen_sysfs.c b/drivers/xen/core/xen_sysfs.c
--- linux-2.6.18.i686/drivers/xen/core/xen_sysfs.c      2008-04-21 09:30:08.000000000 -0400
+++ b/drivers/xen/core/xen_sysfs.c      2008-04-21 09:33:37.000000000 -0400
@@ -104,6 +104,10 @@ static ssize_t uuid_show(struct hyp_sysf
        char *vm, *val;
        int ret;
+       extern int xenstored_ready;
+       if (!xenstored_ready)
+               return -EBUSY;

        vm = xenbus_read(XBT_NIL, "vm", "", NULL);
        if (IS_ERR(vm))
I'm not sure about what it does but I think it will change some code in the following file. I got the latest RHEL4 kernel which contains xen and I changed the kernel version and applied the patch. I did a quick search on the xen_sysfs.c file and found the following lines:


static ssize_t uuid_show(struct hyp_sysfs_attr *attr, char *buffer)
        char *vm, *val;
        int ret;
        extern int xenstored_ready;

        if (!xenstored_ready)
                return -EBUSY;

        vm = xenbus_read(XBT_NIL, "vm", "", NULL);
        if (IS_ERR(vm))
                return PTR_ERR(vm);
        val = xenbus_read(XBT_NIL, vm, "uuid", NULL);
        if (IS_ERR(val))
                return PTR_ERR(val);
        ret = sprintf(buffer, "%s\n", val);
        return ret;
How am I sure the file is patched correctly? Matches the code below the changes above?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
patch installation on RHEL shabev Linux - Enterprise 2 03-20-2008 11:08 AM
ASM x32 vs ASM x64 Tegramon Programming 3 02-27-2008 03:26 PM
Cygwin/X has problem when running on IBM X32 ThinkPad math_physics Linux - Software 13 03-20-2006 05:19 PM
K3B - Burning at x32 robertmenezes Linux - Software 1 01-24-2005 08:44 PM
How to Apply patch for Mass Storage device to work? (uss725-2.4.20-rc2.patch) cevjr Linux - Hardware 3 04-21-2004 12:14 AM

All times are GMT -5. The time now is 02:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration