patch-2.3.43 linux/fs/minix/file.c
Next file: linux/fs/minix/fsync.c
Previous file: linux/fs/minix/dir.c
Back to the patch index
Back to the overall index
- Lines: 67
- Date:
Thu Feb 10 12:16:58 2000
- Orig file:
v2.3.42/linux/fs/minix/file.c
- Orig date:
Fri Jan 7 19:13:22 2000
diff -u --recursive --new-file v2.3.42/linux/fs/minix/file.c linux/fs/minix/file.c
@@ -18,60 +18,21 @@
#include <asm/uaccess.h>
#include <asm/system.h>
-#define NBUF 32
-
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-
#include <linux/fs.h>
#include <linux/minix_fs.h>
/*
- * Write to a file (through the page cache).
- */
-static ssize_t
-minix_file_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
-{
- return generic_file_write(file, buf, count,
- ppos, block_write_partial_page);
-}
-
-/*
* We have mostly NULLs here: the current defaults are OK for
* the minix filesystem.
*/
static struct file_operations minix_file_operations = {
- NULL, /* lseek - default */
- generic_file_read, /* read */
- minix_file_write, /* write */
- NULL, /* readdir - bad */
- NULL, /* poll - default */
- NULL, /* ioctl - default */
- generic_file_mmap, /* mmap */
- NULL, /* no special open is needed */
- NULL, /* flush */
- NULL, /* release */
- minix_sync_file, /* fsync */
- NULL, /* fasync */
+ read: generic_file_read,
+ write: generic_file_write,
+ mmap: generic_file_mmap,
+ fsync: minix_sync_file,
};
struct inode_operations minix_file_inode_operations = {
- &minix_file_operations, /* default file operations */
- NULL, /* create */
- NULL, /* lookup */
- NULL, /* link */
- NULL, /* unlink */
- NULL, /* symlink */
- NULL, /* mkdir */
- NULL, /* rmdir */
- NULL, /* mknod */
- NULL, /* rename */
- NULL, /* readlink */
- NULL, /* follow_link */
- minix_get_block, /* get_block */
- block_read_full_page, /* readpage */
- block_write_full_page, /* writepage */
- minix_truncate, /* truncate */
- NULL, /* permission */
- NULL, /* revalidate */
+ &minix_file_operations,
+ truncate: minix_truncate,
};
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)