1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/driver/device-mapper/dmfs-error.c
Steven Whitehouse ac4fc0b84d o Kill write funcs for error/status files
o Redo write logic for table file
 o Relax rules for symlink content by removing the rewriting function

Well I probably won't get a chance to work on this tomorrow, so this is my
changeset to date.
2001-09-26 20:24:39 +00:00

63 lines
1.6 KiB
C

/*
* dmfs-error.c
*
* Copyright (C) 2001 Sistina Software
*
* This software is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2, or (at
* your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU CC; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <linux/config.h>
#include <linux/fs.h>
static ssize_t dmfs_error_read(struct file *file, char *buf, size_t size, loff_t *pos)
{
return size;
}
static int dmfs_error_sync(struct file *file, struct dentry *dentry, int datasync)
{
return 0;
}
static struct dm_table_file_operations = {
read: dmfs_error_read,
fsync: dmfs_error_sync,
};
static struct dmfs_error_inode_operations = {
};
int dmfs_create_error(struct inode *dir, int mode)
{
struct inode *inode = new_inode(dir->i_sb);
if (inode) {
inode->i_mode = mode | S_IFREG;
inode->i_uid = current->fsuid;
inode->i_gid = current->fsgid;
inode->i_blksize = PAGE_CACHE_SIZE;
inode->i_blocks = 0;
inode->i_rdev = NODEV;
inode->i_atime = inode->i_ctime = inode->i_mtime = CURRENT_TIME;
inode->i_fop = &dmfs_error_file_operations;
inode->i_op = &dmfs_error_inode_operations;
}
return inode;
}