summaryrefslogtreecommitdiffstats
path: root/fs/umsdos
diff options
context:
space:
mode:
Diffstat (limited to 'fs/umsdos')
-rw-r--r--fs/umsdos/dir.c2
-rw-r--r--fs/umsdos/emd.c36
-rw-r--r--fs/umsdos/file.c4
-rw-r--r--fs/umsdos/inode.c34
-rw-r--r--fs/umsdos/rdir.c2
-rw-r--r--fs/umsdos/symlink.c2
6 files changed, 57 insertions, 23 deletions
diff --git a/fs/umsdos/dir.c b/fs/umsdos/dir.c
index 9e0abf55a..8f8a6bbb6 100644
--- a/fs/umsdos/dir.c
+++ b/fs/umsdos/dir.c
@@ -791,7 +791,7 @@ static struct file_operations umsdos_dir_operations = {
UMSDOS_dir_read, /* read */
NULL, /* write - bad */
UMSDOS_readdir, /* readdir */
- NULL, /* select - default */
+ NULL, /* poll - default */
UMSDOS_ioctl_dir, /* ioctl - default */
NULL, /* mmap */
NULL, /* no special open code */
diff --git a/fs/umsdos/emd.c b/fs/umsdos/emd.c
index 6295d0a98..0d4a89298 100644
--- a/fs/umsdos/emd.c
+++ b/fs/umsdos/emd.c
@@ -64,8 +64,31 @@ long umsdos_emd_dir_write (struct inode *emd_dir,
unsigned long count)
{
int written;
+#ifdef __BIG_ENDIAN
+ struct umsdos_dirent *d = (struct umsdos_dirent *)buf;
+#endif
filp->f_flags = 0;
+#ifdef __BIG_ENDIAN
+ d->nlink = cpu_to_le16 (d->nlink);
+ d->uid = cpu_to_le16 (d->uid);
+ d->gid = cpu_to_le16 (d->gid);
+ d->atime = cpu_to_le32 (d->atime);
+ d->mtime = cpu_to_le32 (d->mtime);
+ d->ctime = cpu_to_le32 (d->ctime);
+ d->rdev = cpu_to_le16 (d->rdev);
+ d->mode = cpu_to_le16 (d->mode);
+#endif
written = umsdos_file_write_kmem (emd_dir,filp,buf,count);
+#ifdef __BIG_ENDIAN
+ d->nlink = le16_to_cpu (d->nlink);
+ d->uid = le16_to_cpu (d->uid);
+ d->gid = le16_to_cpu (d->gid);
+ d->atime = le32_to_cpu (d->atime);
+ d->mtime = le32_to_cpu (d->mtime);
+ d->ctime = le32_to_cpu (d->ctime);
+ d->rdev = le16_to_cpu (d->rdev);
+ d->mode = le16_to_cpu (d->mode);
+#endif
return written != count ? -EIO : 0;
}
/*
@@ -80,6 +103,9 @@ long umsdos_emd_dir_read (struct inode *emd_dir,
{
long int ret = 0;
int sizeread;
+#ifdef __BIG_ENDIAN
+ struct umsdos_dirent *d = (struct umsdos_dirent *)buf;
+#endif
filp->f_flags = 0;
sizeread = umsdos_file_read_kmem (emd_dir,filp,buf,count);
if (sizeread != count){
@@ -87,6 +113,16 @@ long umsdos_emd_dir_read (struct inode *emd_dir,
,filp->f_pos,sizeread,count);
ret = -EIO;
}
+#ifdef __BIG_ENDIAN
+ d->nlink = le16_to_cpu (d->nlink);
+ d->uid = le16_to_cpu (d->uid);
+ d->gid = le16_to_cpu (d->gid);
+ d->atime = le32_to_cpu (d->atime);
+ d->mtime = le32_to_cpu (d->mtime);
+ d->ctime = le32_to_cpu (d->ctime);
+ d->rdev = le16_to_cpu (d->rdev);
+ d->mode = le16_to_cpu (d->mode);
+#endif
return ret;
}
diff --git a/fs/umsdos/file.c b/fs/umsdos/file.c
index d01ef6f87..cda0e4e8d 100644
--- a/fs/umsdos/file.c
+++ b/fs/umsdos/file.c
@@ -66,7 +66,7 @@ struct file_operations umsdos_file_operations = {
UMSDOS_file_read, /* read */
UMSDOS_file_write, /* write */
NULL, /* readdir - bad */
- NULL, /* select - default */
+ NULL, /* poll - default */
NULL, /* ioctl - default */
generic_file_mmap, /* mmap */
NULL, /* no special open is needed */
@@ -100,7 +100,7 @@ struct file_operations umsdos_file_operations_no_bmap = {
UMSDOS_file_read, /* read */
UMSDOS_file_write, /* write */
NULL, /* readdir - bad */
- NULL, /* select - default */
+ NULL, /* poll - default */
NULL, /* ioctl - default */
fat_mmap, /* mmap */
NULL, /* no special open is needed */
diff --git a/fs/umsdos/inode.c b/fs/umsdos/inode.c
index 8157edca6..8a00fd833 100644
--- a/fs/umsdos/inode.c
+++ b/fs/umsdos/inode.c
@@ -1,13 +1,14 @@
/*
* linux/fs/umsdos/inode.c
*
- * Written 1993 by Jacques Gelinas
+ * Written 1993 by Jacques Gelinas
* Inspired from linux/fs/msdos/... by Werner Almesberger
*
*/
#include <linux/module.h>
+#include <linux/init.h>
#include <linux/fs.h>
#include <linux/msdos_fs.h>
#include <linux/kernel.h>
@@ -275,7 +276,7 @@ int UMSDOS_notify_change(struct inode *inode, struct iattr *attr)
{
int ret = 0;
- if ((ret = inode_change_ok(inode, attr)) != 0)
+ if ((ret = inode_change_ok(inode, attr)) != 0)
return ret;
if (inode->i_nlink > 0){
@@ -321,17 +322,17 @@ int UMSDOS_notify_change(struct inode *inode, struct iattr *attr)
ret = umsdos_emd_dir_read (emd_owner,&filp,(char*)&entry
,UMSDOS_REC_SIZE);
if (ret == 0){
- if (attr->ia_valid & ATTR_UID)
+ if (attr->ia_valid & ATTR_UID)
entry.uid = attr->ia_uid;
- if (attr->ia_valid & ATTR_GID)
+ if (attr->ia_valid & ATTR_GID)
entry.gid = attr->ia_gid;
- if (attr->ia_valid & ATTR_MODE)
+ if (attr->ia_valid & ATTR_MODE)
entry.mode = attr->ia_mode;
- if (attr->ia_valid & ATTR_ATIME)
+ if (attr->ia_valid & ATTR_ATIME)
entry.atime = attr->ia_atime;
- if (attr->ia_valid & ATTR_MTIME)
+ if (attr->ia_valid & ATTR_MTIME)
entry.mtime = attr->ia_mtime;
- if (attr->ia_valid & ATTR_CTIME)
+ if (attr->ia_valid & ATTR_CTIME)
entry.ctime = attr->ia_ctime;
entry.nlink = inode->i_nlink;
@@ -352,7 +353,7 @@ int UMSDOS_notify_change(struct inode *inode, struct iattr *attr)
PRINTK (("\n"));
}
}
- if (ret == 0)
+ if (ret == 0)
inode_setattr(inode, attr);
return ret;
}
@@ -366,7 +367,7 @@ int UMSDOS_notify_change(struct inode *inode, struct iattr *attr)
so it's easier to tell them apart.
*/
-static struct super_operations umsdos_sops = {
+static struct super_operations umsdos_sops = {
UMSDOS_read_inode,
UMSDOS_notify_change,
UMSDOS_write_inode,
@@ -431,7 +432,7 @@ struct super_block *UMSDOS_read_super(
This feature allows the installation
of a linux system within a DOS system in a subdirectory.
-
+
A user may install its linux stuff in c:\linux
avoiding any clash with existing DOS file and subdirectory.
When linux boots, it hides this fact, showing a normal
@@ -499,19 +500,17 @@ static struct file_system_type umsdos_fs_type = {
UMSDOS_read_super, "umsdos", 1, NULL
};
-int init_umsdos_fs(void)
+__initfunc(int init_umsdos_fs(void))
{
return register_filesystem(&umsdos_fs_type);
}
#ifdef MODULE
+EXPORT_NO_SYMBOLS;
+
int init_module(void)
{
- int status;
-
- if ((status = init_umsdos_fs()) == 0)
- register_symtab(0);
- return status;
+ return init_umsdos_fs();
}
void cleanup_module(void)
@@ -520,4 +519,3 @@ void cleanup_module(void)
}
#endif
-
diff --git a/fs/umsdos/rdir.c b/fs/umsdos/rdir.c
index da07c0d61..a2a5364f6 100644
--- a/fs/umsdos/rdir.c
+++ b/fs/umsdos/rdir.c
@@ -240,7 +240,7 @@ static struct file_operations umsdos_rdir_operations = {
UMSDOS_dir_read, /* read */
NULL, /* write - bad */
UMSDOS_rreaddir, /* readdir */
- NULL, /* select - default */
+ NULL, /* poll - default */
UMSDOS_ioctl_dir, /* ioctl - default */
NULL, /* mmap */
NULL, /* no special open code */
diff --git a/fs/umsdos/symlink.c b/fs/umsdos/symlink.c
index 7bbcc0ef0..8b6678ae9 100644
--- a/fs/umsdos/symlink.c
+++ b/fs/umsdos/symlink.c
@@ -116,7 +116,7 @@ static struct file_operations umsdos_symlink_operations = {
NULL, /* read */
NULL, /* write */
NULL, /* readdir - bad */
- NULL, /* select - default */
+ NULL, /* poll - default */
NULL, /* ioctl - default */
NULL, /* mmap */
NULL, /* no special open is needed */