-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdexdrive.h
51 lines (39 loc) · 1.68 KB
/
dexdrive.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
dexdrive.h: Linux block driver for the DexDrive
Copyright (C) 2002,2009 Frédéric Brière
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.
This program 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 this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _DEXDRIVE_H_
#define _DEXDRIVE_H_
#include <linux/ioctl.h>
/*
* Line discipline number reserved for our own purposes. Unfortunately, it's
* not possible to add such a number, so an existing one must be hijacked from
* include/linux/tty.h for the time being.
*/
#define DEX_LDISC N_PROFIBUS_FDL /* Default line discipline number */
/*
* This defines a series of ioctl() requests specific to this driver.
*/
/*
* "type" field of all ioctl() request numbers -- we grab the 80-9F range,
* which is listed as free in Documentation/ioctl-number.txt .
*/
#define DEX_IOC_MAGIC 0xDD
/*
* These can be called on the underlying tty device to obtain the device number
* of the block device that was created.
*/
#define DEX_IOCTL_GET_MAJOR _IOR(DEX_IOC_MAGIC, 0x81, unsigned int)
#define DEX_IOCTL_GET_MINOR _IOR(DEX_IOC_MAGIC, 0x82, unsigned int)
#endif /* _DEXDRIVE_H */