-
Notifications
You must be signed in to change notification settings - Fork 0
/
disk.h
23 lines (19 loc) · 1.01 KB
/
disk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
https://powcoder.com
代写代考加微信 powcoder
Assignment Project Exam Help
Add WeChat powcoder
#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