LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 09-24-2008, 06:54 AM   #1
Erhnam
Member
 
Registered: Jan 2005
Posts: 54

Rep: Reputation: 15
x2v-x32-rhel.patch


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:

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:

xen_sysfs.c

Code:
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);
        kfree(vm);
        if (IS_ERR(val))
                return PTR_ERR(val);
        ret = sprintf(buffer, "%s\n", val);
        kfree(val);
        return ret;
}
How am I sure the file is patched correctly? Matches the code below the changes above?
 
  


Reply


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 10:08 AM
ASM x32 vs ASM x64 Tegramon Programming 3 02-27-2008 02:26 PM
Cygwin/X has problem when running on IBM X32 ThinkPad math_physics Linux - Software 13 03-20-2006 04:19 PM
K3B - Burning at x32 robertmenezes Linux - Software 1 01-24-2005 07:44 PM
How to Apply patch for Mass Storage device to work? (uss725-2.4.20-rc2.patch) cevjr Linux - Hardware 3 04-20-2004 11:14 PM


All times are GMT -5. The time now is 03:53 AM.

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