This commit was generated by cvs2svn to compensate for changes in r2,
[btb/d2x.git] / arch / dos / disk.c
1 #include <dos.h>
2 #include <limits.h>
3 #include "types.h"
4 #include "error.h"
5
6 unsigned long getdiskfree() {
7         struct diskfree_t dfree;
8         unsigned drive;
9
10         _dos_getdrive(&drive);
11         if (!_dos_getdiskfree(drive, &dfree))
12                 return dfree.avail_clusters * dfree.sectors_per_cluster * dfree.bytes_per_sector;
13         else {
14                 Int3();         // get MARK A!!!!!
15                 return ULONG_MAX;                                       // make be biggest it can be
16         }
17 }