File: no-block.c

package info (click to toggle)
linux 3.16.7-ckt4-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 736,636 kB
  • ctags: 2,374,727
  • sloc: ansic: 12,214,218; asm: 277,326; perl: 54,003; xml: 47,771; makefile: 30,483; sh: 8,035; python: 6,597; cpp: 5,124; yacc: 4,254; lex: 2,215; awk: 741; pascal: 231; lisp: 218; sed: 30
file content (23 lines) | stat: -rw-r--r-- 688 bytes parent folder | download | duplicates (29)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* no-block.c: implementation of routines required for non-BLOCK configuration
 *
 * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells (dhowells@redhat.com)
 *
 * This program 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 of the License, or (at your option) any later version.
 */

#include <linux/kernel.h>
#include <linux/fs.h>

static int no_blkdev_open(struct inode * inode, struct file * filp)
{
	return -ENODEV;
}

const struct file_operations def_blk_fops = {
	.open		= no_blkdev_open,
	.llseek		= noop_llseek,
};