-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathxstructs.h
More file actions
83 lines (76 loc) · 3.56 KB
/
xstructs.h
File metadata and controls
83 lines (76 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/****************************************************************/
/* */
/* xstructs.h */
/* */
/* Extended DOS 7.0+ structures */
/* */
/****************************************************************/
#ifdef MAIN
#ifdef VERSION_STRINGS
static BYTE *XStructs_hRcsId =
"$Id: xstructs.h 1457 2009-06-26 20:00:41Z bartoldeman $";
#endif
#endif
struct xdpbdata {
UWORD xdd_dpbsize;
struct dpb xdd_dpb;
};
struct xfreespace {
UWORD xfs_datasize; /* size of this structure */
union {
UWORD requested; /* requested structure version */
UWORD actual; /* actual structure version */
} xfs_version;
ULONG xfs_clussize; /* number of sectors per cluster */
ULONG xfs_secsize; /* number of bytes per sector */
ULONG xfs_freeclusters; /* number of available clusters */
ULONG xfs_totalclusters; /* total number of clusters on the drive */
ULONG xfs_freesectors; /* number of physical sectors available */
ULONG xfs_totalsectors; /* total number of physical sectors */
ULONG xfs_freeunits; /* number of available allocation units */
ULONG xfs_totalunits; /* total allocation units */
UBYTE xfs_reserved[8];
};
struct xdpbforformat {
UWORD xdff_datasize; /* size of this structure */
union {
UWORD requested; /* requested structure version */
UWORD actual; /* actual structure version */
} xdff_version;
UDWORD xdff_function; /* function number:
00h invalidate DPB counts
01h rebuild DPB from BPB
02h force media change
03h get/set active FAT number and mirroring
04h get/set root directory cluster number
*/
union {
struct {
DWORD nfreeclst; /* # free clusters
(-1 - unknown, 0 - don't change) */
DWORD cluster; /* cluster # of first free
(-1 - unknown, 0 - don't change) */
UDWORD reserved[2];
} setdpbcounts;
struct {
UDWORD unknown;
bpb FAR *bpbp;
UDWORD reserved[2];
} rebuilddpb;
struct {
DWORD new; /* new active FAT/mirroring state, or -1 to get
bits 3-0: the 0-based FAT number of the active FAT
bits 6-4: reserved (0)
bit 7: do not mirror active FAT to inactive FATs
or:
set new root directory cluster, -1 - get current
*/
DWORD old; /* previous active FAT/mirroring state (as above)
or
get previous root directory cluster
*/
UDWORD reserved[2];
} setget;
} xdff_f;
};
COUNT DosGetExtFree(BYTE FAR * DriveString, struct xfreespace FAR * xfsp);