/* filesys.c (rsxnt) -- Copyright (c) 1996-1997 Rainer Schnitker */

#include "rsxnt.h"

int __filesys(const char *drive, char *outbuf, size_t size)
{
    TCHAR root[4];
    TCHAR volumebuf[20];
    DWORD filelen, flags;

    root[0] = drive[0];
    root[1] = drive[1];
    root[2] = '\\';
    root[3] = '\0';
    if (GetVolumeInformation((LPCTSTR)root, volumebuf, sizeof(volumebuf),
	    NULL, &filelen, &flags, (LPTSTR) outbuf, size) == FALSE)
	return _rsxnt_get_last_errno();
    else
	return 0;
}
