maltalinux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: malta

To: maltalinux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: malta
From: beth@linux-mips.org
Date: Thu, 11 Aug 2005 14:27:22 +0100
Reply-to: linux-mips@linux-mips.org
Sender: maltalinux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    malta
Changes by:     beth@ftp.linux-mips.org 05/08/11 14:27:20

Modified files:
        linux/arch/mips/kernel: Tag: MaltaRef_2_6 rtlx.c 

Log message:
        Fix O_NONBLOCK flag handling

diff -urN malta/linux/arch/mips/kernel/rtlx.c 
malta/linux/arch/mips/kernel/rtlx.c
--- malta/linux/arch/mips/kernel/rtlx.c 2005/08/08 13:24:14     1.1.1000.2
+++ malta/linux/arch/mips/kernel/rtlx.c 2005/08/11 13:27:20     1.1.1000.3
@@ -167,6 +167,10 @@
                                remove_wait_queue(&channel_wqs[index].lx_queue, 
&wait);
 
                                /* back running */
+                       } else {
+                               printk( KERN_DEBUG "No SP program loaded, and 
device "
+                                       "opened with O_NONBLOCK\n");
+                               return -ENOSYS;
                        }
                }
 
@@ -354,7 +358,7 @@
 {
        int minor = MINOR(inode->i_rdev);
 
-       return rtlx_open(minor, 0);
+       return rtlx_open(minor, (filp->f_flags & O_NONBLOCK) ? 0 : 1);
 }
 
 static int file_release(struct inode *inode, struct file *filp)
@@ -394,7 +398,7 @@
        int minor = MINOR(file->f_dentry->d_inode->i_rdev);
 
        /* data available? */
-       if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK))) {
+       if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) {
                return 0;       // -EAGAIN makes cat whinge
        }
        

<Prev in Thread] Current Thread [Next in Thread>