about summary refs log tree commit diff stats
path: root/tools/iso/kernel.soso/device.h
blob: ac85634b6a066bd076d5738f639d1cb6c81825f2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef DEVICE_H
#define DEVICE_H

#include "common.h"
#include "fs.h"

typedef struct Device {
    char name[16];
    FileType deviceType;
    ReadWriteBlockFunction readBlock;
    ReadWriteBlockFunction writeBlock;
    ReadWriteFunction read;
    ReadWriteFunction write;
    OpenFunction open;
    CloseFunction close;
    IoctlFunction ioctl;
    FtruncateFunction ftruncate;
    MmapFunction mmap;
    MunmapFunction munmap;
    void * privateData;
} Device;

#endif // DEVICE_H