This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / i386 / kernel / cpu / mtrr / if.c
index 0946844..c635505 100644 (file)
@@ -101,6 +101,9 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
 
        if (!capable(CAP_SYS_ADMIN))
                return -EPERM;
+       /*  Can't seek (pwrite) on this device  */
+       if (ppos != &file->f_pos)
+               return -ESPIPE;
        memset(line, 0, LINE_SIZE);
        if (len > LINE_SIZE)
                len = LINE_SIZE;
@@ -157,7 +160,7 @@ mtrr_ioctl(struct inode *inode, struct file *file,
 
        switch (cmd) {
        default:
-               return -ENOTTY;
+               return -ENOIOCTLCMD;
        case MTRRIOC_ADD_ENTRY:
                if (!capable(CAP_SYS_ADMIN))
                        return -EPERM;