Code to implement the most simple device block, based on printk's.
[vdi_driver.git] / src / driver / vdi.h
blob2cf150a3d5c722913ffe8dac2cffa68bb9ed06c6
1 /*
2 * vdi.h - The driver for virtual disks of VirtualBox
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef ___vdi_h
19 #define ___vdi_h
21 #define VDI_DEBUG
23 #define VDI_MAJOR 0
24 #define VDI_SIZE 20
25 #define VDI_BLKSIZE 512
26 #define VDI_SECTORS 20
27 #define VDI_HARDSECT_SIZE 512
29 #define KERNEL_SECTOR_SIZE 512
31 typedef struct vdi_dev {
32 unsigned long size; // Device size in bytes
33 spinlock_t lock; // Mutual exclusion
34 //TODO: remove this?struct request_queue *queue; // Device request queue
35 struct gendisk *gd; // gendisk structure
36 } vdi_dev;
38 #endif