-
Notifications
You must be signed in to change notification settings - Fork 0
/
disk.h
19 lines (15 loc) · 932 Bytes
/
disk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef _DISK_H_
#define _DISK_H_
/******************************************************************************/
#define DISK_BLOCKS 8192 /* number of blocks on the disk */
#define BLOCK_SIZE 4096 /* block size on "disk" */
/******************************************************************************/
int make_disk(char *name); /* create an empty, virtual disk file */
int open_disk(char *name); /* open a virtual disk (file) */
int close_disk(); /* close a previously opened disk (file) */
int block_write(int block, char *buf);
/* write a block of size BLOCK_SIZE to disk */
int block_read(int block, char *buf);
/* read a block of size BLOCK_SIZE from disk */
/******************************************************************************/
#endif