diff options
author | Taru Karttunen <taruti@taruti.net> | 2011-03-30 15:46:40 +0300 |
---|---|---|
committer | Taru Karttunen <taruti@taruti.net> | 2011-03-30 15:46:40 +0300 |
commit | e5888a1ffdae813d7575f5fb02275c6bb07e5199 (patch) | |
tree | d8d51eac403f07814b9e936eed0c9a79195e2450 /sys/src/cmd/cfs/disk.h |
Import sources from 2011-03-30 iso image
Diffstat (limited to 'sys/src/cmd/cfs/disk.h')
-rwxr-xr-x | sys/src/cmd/cfs/disk.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/src/cmd/cfs/disk.h b/sys/src/cmd/cfs/disk.h new file mode 100755 index 000000000..a085a82ec --- /dev/null +++ b/sys/src/cmd/cfs/disk.h @@ -0,0 +1,24 @@ +typedef struct Disk Disk; + +/* + * Reference to the disk + */ +struct Disk +{ + Bcache; + ulong nb; /* number of blocks */ + ulong nab; /* number of allocation blocks */ + int b2b; /* allocation bits to a block */ + int p2b; /* Dptr's per page */ + char name[CACHENAMELEN]; +}; + +int dinit(Disk*, int, int, char*); +int dformat(Disk*, int, char*, ulong, ulong); +ulong dalloc(Disk*, Dptr*); +ulong dpalloc(Disk*, Dptr*); +int dfree(Disk*, Dptr*); + +extern int debug; + +#define DPRINT if(debug)fprint |