no-block.c 478 B

12345678910111213141516171819
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  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)
  6. */
  7. #include <linux/kernel.h>
  8. #include <linux/fs.h>
  9. static int no_blkdev_open(struct inode * inode, struct file * filp)
  10. {
  11. return -ENODEV;
  12. }
  13. const struct file_operations def_blk_fops = {
  14. .open = no_blkdev_open,
  15. .llseek = noop_llseek,
  16. };