Patch: linux-2.4.0test1-ac19/fs/devfs/base.c did not compile

From: Adam J. Richter (adam@yggdrasil.com)
Date: Thu Jun 15 2000 - 04:54:30 EST


        [I tried send this to linux-kernel a few hours ago, and I
got an uninformative error message that talked about "policy analasys"
(I wonder how the message can be called "analasys" when it does not
explain exactly what the cause or even the symptom of the problem was.)
Anyhow, I am resubmitting in the hopes that the error was temporary.]

        linux-2.4.0test1-ac19/fs/devfs/base.c did not compile, because
df->ops is a void* that needs to be cast into its proper type in
order for fops_get to work. I have attached a patch below, although
better approaches would be either to make fops_get an inline function
(so the parameter would be cast automatically) or figure out of df->fops
really needs to be a void*, or both.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."

------------------------CUT HERE------------------------------------------
--- linux-2.4.0test1-ac19/fs/devfs/base.c Wed Jun 14 20:55:02 2000
+++ linux/fs/devfs/base.c Wed Jun 14 21:34:52 2000
@@ -2640,7 +2640,7 @@
         file->f_op = &def_blk_fops;
         if (df->ops) inode->i_bdev->bd_op = df->ops;
     }
- else file->f_op = fops_get(df->ops);
+ else file->f_op = fops_get((struct file_operations*) df->ops);
     if (file->f_op)
         err = file->f_op->open ? (*file->f_op->open) (inode, file) : 0;
     else

--BAA10017.961058593/freya.yggdrasil.com--

ction: delayed
Status: 4.2.0
Remote-MTA: DNS; vger.rutgers.edu
Diagnostic-Code: SMTP; 450-4.4.3 Policy analysis reports temporary DNS error
Last-Attempt-Date: Thu, 15 Jun 2000 01:43:13 -0700
Will-Retry-Until: Mon, 19 Jun 2000 21:39:01 -0700

--BAA10017.961058593/freya.yggdrasil.com
Content-Type: message/rfc822

Return-Path: <adam@yggdrasil.com>
Received: from baldur.yggdrasil.com (baldur.yggdrasil.com [209.249.10.12])
        by freya.yggdrasil.com (8.9.3/8.9.0) with ESMTP id VAA04859;
        Wed, 14 Jun 2000 21:39:01 -0700
From: "Adam J. Richter" <adam@yggdrasil.com>
Received: (from adam@localhost)
        by baldur.yggdrasil.com (8.9.3/8.9.3) id VAA27098;
        Wed, 14 Jun 2000 21:38:59 -0700
Date: Wed, 14 Jun 2000 21:38:59 -0700
Message-Id: <200006150438.VAA27098@baldur.yggdrasil.com>
To: linux-kernel@vger.rutgers.edu
Subject: Patch: linux-2.4.0test1-ac19/fs/devfs/base.c did not compile

        linux-2.4.0test1-ac19/fs/devfs/base.c did not compile, because
df->ops is a void* that needs to be cast into its proper type in
order for fops_get to work. I have attached a patch below, although
better approaches would be either to make fops_get an inline function
(so the parameter would be cast automatically) or figure out of df->fops
really needs to be a void*, or both.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."

------------------------CUT HERE------------------------------------------
--- linux-2.4.0test1-ac19/fs/devfs/base.c Wed Jun 14 20:55:02 2000
+++ linux/fs/devfs/base.c Wed Jun 14 21:34:52 2000
@@ -2640,7 +2640,7 @@
         file->f_op = &def_blk_fops;
         if (df->ops) inode->i_bdev->bd_op = df->ops;
     }
- else file->f_op = fops_get(df->ops);
+ else file->f_op = fops_get((struct file_operations*) df->ops);
     if (file->f_op)
         err = file->f_op->open ? (*file->f_op->open) (inode, file) : 0;
     else

--BAA10017.961058593/freya.yggdrasil.com--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:35 EST