Back to home page

LXR

 
 

    


0001 /* no-block.c: implementation of routines required for non-BLOCK configuration
0002  *
0003  * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
0004  * Written by David Howells (dhowells@redhat.com)
0005  *
0006  * This program is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU General Public License
0008  * as published by the Free Software Foundation; either version
0009  * 2 of the License, or (at your option) any later version.
0010  */
0011 
0012 #include <linux/kernel.h>
0013 #include <linux/fs.h>
0014 
0015 static int no_blkdev_open(struct inode * inode, struct file * filp)
0016 {
0017     return -ENODEV;
0018 }
0019 
0020 const struct file_operations def_blk_fops = {
0021     .open       = no_blkdev_open,
0022     .llseek     = noop_llseek,
0023 };