lkml.org 
[lkml]   [1996]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subjectv2.1.0 fs/umsdos/emd.c
Date
There seem to be some type problems in fs/umsdos/emd.c (including
prototypes that don't match). The following patch should fix some (but
not all) of them; there seem to be some additional signed/unsigned
problems here.

tlr

--- fs/umsdos/emd.c.orig Tue Oct 1 13:24:45 1996
+++ fs/umsdos/emd.c Tue Oct 1 13:26:18 1996
@@ -23,11 +23,11 @@
/*
Read a file into kernel space memory
*/
-int umsdos_file_read_kmem(
+long umsdos_file_read_kmem(
struct inode *inode,
struct file *filp,
char *buf,
- int count)
+ unsigned long count)
{
int ret;
int old_fs = get_fs();
@@ -39,11 +39,11 @@
/*
Write to a file from kernel space
*/
-int umsdos_file_write_kmem(
+long umsdos_file_write_kmem(
struct inode *inode,
struct file *filp,
const char *buf,
- int count)
+ unsigned long count)
{
int ret;
int old_fs = get_fs();
@@ -60,13 +60,13 @@

Return 0 if ok, a negative error code if not.
*/
-int umsdos_emd_dir_write (
+long umsdos_emd_dir_write (
struct inode *emd_dir,
struct file *filp,
char *buf, /* buffer in kernel memory, not in user space */
- int count)
+ unsigned long count)
{
- int written;
+ long written;
filp->f_flags = 0;
written = umsdos_file_write_kmem (emd_dir,filp,buf,count);
return written != count ? -EIO : 0;
@@ -76,18 +76,18 @@
The block of data is NOT in user space.
Return 0 if ok, -EIO if any error.
*/
-int umsdos_emd_dir_read (
+long umsdos_emd_dir_read (
struct inode *emd_dir,
struct file *filp,
char *buf, /* buffer in kernel memory, not in user space */
- int count)
+ unsigned long count)
{
int ret = 0;
- int sizeread;
+ long sizeread;
filp->f_flags = 0;
sizeread = umsdos_file_read_kmem (emd_dir,filp,buf,count);
if (sizeread != count){
- printk ("UMSDOS: problem with EMD file. Can't read pos = %Ld (%d != %d)\n"
+ printk ("UMSDOS: problem with EMD file. Can't read pos = %Ld (%ld != %ld)\n"
,filp->f_pos,sizeread,count);
ret = -EIO;
}
--
Thomas Roessler http://www.rhein.de/~roessler/
\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.028 / U:9.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site