[SOLVED] 代写 #ifndef FS_H

30 $

File Name: 代写_#ifndef_FS_H.zip
File Size: 178.98 KB

SKU: 8492609478 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


#ifndef FS_H
#define FS_H
/* Prevent multiple inclusion */

/* fs.h
* Various definitions for OSP Practical Case Study E
*/

/* The bitmap */
extern unsigned char bitmap[10];
/* 320Kb disk with 4Kb blocks-> 80 blocks -> 10 bytes for bitmap
*/

/* The directory entry */
struct entry
{
charuser;
charname[9];
charextension[4];
short blockcount;
short block[8];
};

/* The Directory */
extern struct entry directory[128];

/* extern means its defined in another
file, prevents multiple definition
errors
*/

int toggle_bit(int block);
/* Toggles the value of the bit ‘block’, in
the external array ‘bitmap’.
returns the current value of the bit
Does NOT validate ‘block’!!!
*/
int block_status(int block);
/* Returns the status of ‘block’,
in the external array bitmap
returns 0 if bitmap bit is 0,
not 0 if bitmap bit is 1
Does NOT validate block!!!
*/
#endif

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 #ifndef FS_H
30 $