Date: Sun, 14 Sep 1997 17:57:55 +0300 (IDT) From: Eli Zaretskii To: Deltaman cc: djgpp AT delorie DOT com Subject: Re: Check how large the hard-drive is In-Reply-To: <34196B99.407F@swipnet.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Fri, 12 Sep 1997, Deltaman wrote: > Are there any ways to see how much _total_ diskspace a harddrive has > (both free and used)? I found a function that can tell how much _free_ > diskspace is available (getdfree), but it is not what I wanted. It seems that you have missed the docs. The documentation of `getdfree' clearly tells that you get both free and total space: void getdfree(unsigned char drive, struct dfree *ptr); Description ----------- This function gets information about the size and fullness of the given drive (0=default, 1=A:, etc). The return structure is as follows: struct dfree { unsigned df_avail; /* number of available clusters */ unsigned df_total; /* total number of clusters */ unsigned df_bsec; /* bytes per sector */ unsigned df_sclus; /* sectors per cluster */ };