Thomas Gleixner | 2874c5f | 2019-05-27 08:55:01 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
David Howells | 9361401 | 2006-09-30 20:45:40 +0200 | [diff] [blame] | 2 | /* no-block.c: implementation of routines required for non-BLOCK configuration |
| 3 | * |
| 4 | * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. |
| 5 | * Written by David Howells (dhowells@redhat.com) |
David Howells | 9361401 | 2006-09-30 20:45:40 +0200 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <linux/kernel.h> |
| 9 | #include <linux/fs.h> |
| 10 | |
| 11 | static int no_blkdev_open(struct inode * inode, struct file * filp) |
| 12 | { |
| 13 | return -ENODEV; |
| 14 | } |
| 15 | |
| 16 | const struct file_operations def_blk_fops = { |
| 17 | .open = no_blkdev_open, |
Arnd Bergmann | 6038f37 | 2010-08-15 18:52:59 +0200 | [diff] [blame] | 18 | .llseek = noop_llseek, |
David Howells | 9361401 | 2006-09-30 20:45:40 +0200 | [diff] [blame] | 19 | }; |