Release of coccinelle 1.0.0-rc9
[bpt/coccinelle.git] / tests / toplevel_struct.res
CommitLineData
34e49164
C
1struct SHT usb_stor_host_template = {
2 /* basic userland interface stuff */
3 .name = "usb-storage",
4 .proc_name = "usb-storage",
5 .proc_info2 = usb_storage_proc_info2,
6 .foo = 12,
7 .proc_info = usb_storage_proc_info,
8 .proc_dir = NULL,
9 .info = usb_storage_info,
10 .ioctl = NULL,
11
12 /* old-style detect and release */
13 .detect = NULL,
14 .release = NULL,
15
16 /* command interface -- queued only */
17 .command = NULL,
18 .queuecommand = usb_storage_queuecommand,
19
20 /* error and abort handlers */
21 .eh_abort_handler = usb_storage_command_abort,
22 .eh_device_reset_handler = usb_storage_device_reset,
23 .eh_bus_reset_handler = usb_storage_bus_reset,
24 .eh_host_reset_handler = NULL,
25 .eh_strategy_handler = NULL,
26
27 /* queue commands only, only one command per LUN */
28 .can_queue = 1,
29 .cmd_per_lun = 1,
30
31 /* unknown initiator id */
32 .this_id = -1,
33
34 /* no limit on commands */
35 .max_sectors = 0,
36
37 /* pre- and post- device scan functions */
38 .slave_alloc = NULL,
39 .slave_configure = NULL,
40 .slave_destroy = NULL,
41
42 /* lots of sg segments can be handled */
43 .sg_tablesize = SG_ALL,
44
45 /* use 32-bit address space for DMA */
46 .unchecked_isa_dma = FALSE,
47 .highmem_io = FALSE,
48
49 /* merge commands... this seems to help performance, but
50 * periodically someone should test to see which setting is more
51 * optimal.
52 */
53 .use_clustering = TRUE,
54
55 /* emulated HBA */
56 .emulated = TRUE,
57
58 /* sorry, no BIOS to help us */
59 .bios_param = NULL,
60
61 /* module management */
62 .module = THIS_MODULE
63};
64
65/* For a device that is "Not Ready" */
66unsigned char usb_stor_sense_notready[18] = {
67 [0] = 0x70, /* current error */
68 [2] = 0x02, /* not ready */
69 [7] = 0x0a, /* additional length */
70 [12] = 0x04, /* not ready */
71 [13] = 0x03 /* manual intervention */
72};
73
74
75void usb_storage_proc_info(int i) {
76 g(1);
77}
78
79void usb_storage_proc_info2(int i) {
80 g(27);
81}
82
83
84void not_usb_storage_proc_info(int i) {
85 f(1);
86}