xref: /aosp_15_r20/external/ltp/testcases/kernel/device-drivers/include/includeTest.h (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1*49cdfc7eSAndroid Build Coastguard Worker /*
2*49cdfc7eSAndroid Build Coastguard Worker  *
3*49cdfc7eSAndroid Build Coastguard Worker  *   Copyright (c) International Business Machines  Corp., 2001
4*49cdfc7eSAndroid Build Coastguard Worker  *
5*49cdfc7eSAndroid Build Coastguard Worker  *   This program is free software;  you can redistribute it and/or modify
6*49cdfc7eSAndroid Build Coastguard Worker  *   it under the terms of the GNU General Public License as published by
7*49cdfc7eSAndroid Build Coastguard Worker  *   the Free Software Foundation; either version 2 of the License, or
8*49cdfc7eSAndroid Build Coastguard Worker  *   (at your option) any later version.
9*49cdfc7eSAndroid Build Coastguard Worker  *
10*49cdfc7eSAndroid Build Coastguard Worker  *   This program is distributed in the hope that it will be useful,
11*49cdfc7eSAndroid Build Coastguard Worker  *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
12*49cdfc7eSAndroid Build Coastguard Worker  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
13*49cdfc7eSAndroid Build Coastguard Worker  *   the GNU General Public License for more details.
14*49cdfc7eSAndroid Build Coastguard Worker  *
15*49cdfc7eSAndroid Build Coastguard Worker  *   You should have received a copy of the GNU General Public License
16*49cdfc7eSAndroid Build Coastguard Worker  *   along with this program;  if not, write to the Free Software
17*49cdfc7eSAndroid Build Coastguard Worker  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*49cdfc7eSAndroid Build Coastguard Worker  */
19*49cdfc7eSAndroid Build Coastguard Worker 
20*49cdfc7eSAndroid Build Coastguard Worker 
21*49cdfc7eSAndroid Build Coastguard Worker #define MAG_NUM 'k'
22*49cdfc7eSAndroid Build Coastguard Worker #define MODULE_TEST_COMPONENT   0x00023000
23*49cdfc7eSAndroid Build Coastguard Worker #define OPTION1                 _IO(MAG_NUM, 1)
24*49cdfc7eSAndroid Build Coastguard Worker #define _COMPONENT              MODULE_TEST_COMPONENT
25*49cdfc7eSAndroid Build Coastguard Worker #define TEST_DRIVER_NAME        "David's include test module"
26*49cdfc7eSAndroid Build Coastguard Worker #define DEVICE_NAME             "includeTest"
27*49cdfc7eSAndroid Build Coastguard Worker #define DEV_PATH		"/dev"
28*49cdfc7eSAndroid Build Coastguard Worker #define INCLUDE_DEVICE_PATH	DEV_PATH "/"
29*49cdfc7eSAndroid Build Coastguard Worker #define INCLUDEMAJOR		253
30*49cdfc7eSAndroid Build Coastguard Worker #define MINOR_SHIFT_BITS 	3
31*49cdfc7eSAndroid Build Coastguard Worker #define MAX_PARTITIONS		8
32*49cdfc7eSAndroid Build Coastguard Worker #define MAX_NUM_DISKS		3
33*49cdfc7eSAndroid Build Coastguard Worker #define DEV_NAME		"includeTest"
34*49cdfc7eSAndroid Build Coastguard Worker 
35*49cdfc7eSAndroid Build Coastguard Worker typedef struct _incdev_cmd {
36*49cdfc7eSAndroid Build Coastguard Worker 	u_int32_t cmd;
37*49cdfc7eSAndroid Build Coastguard Worker 	u_int32_t status;
38*49cdfc7eSAndroid Build Coastguard Worker } incdev_cmd_t;
39*49cdfc7eSAndroid Build Coastguard Worker 
40*49cdfc7eSAndroid Build Coastguard Worker typedef enum incdev_ioctl_cmds_s {
41*49cdfc7eSAndroid Build Coastguard Worker 	INC_IOCTL_NUMBER = 0x5500
42*49cdfc7eSAndroid Build Coastguard Worker } incdev_ioctl_cmds_t;
43*49cdfc7eSAndroid Build Coastguard Worker 
44*49cdfc7eSAndroid Build Coastguard Worker #define INCDEV_CMD		_IOR(INCLUDEMAJOR, INC_IOCTL_NUMBER, incdev_cmd_t**)
45*49cdfc7eSAndroid Build Coastguard Worker 
46*49cdfc7eSAndroid Build Coastguard Worker /*
47*49cdfc7eSAndroid Build Coastguard Worker  * function prototypes
48*49cdfc7eSAndroid Build Coastguard Worker  */
49*49cdfc7eSAndroid Build Coastguard Worker 
50*49cdfc7eSAndroid Build Coastguard Worker static void option1(void);
51