dosustat
Purpose
Gets the status of a given DOS Services device.
Library
DOS Services Library (libdos.a)
Syntax
#include <dos.h>
int dosustat (device, buf)
char *device;
DOSUSTAT *buf;
Description
The dosustat subroutine gets the status of the DOS Ser-
vices device specified by the device parameter and
returns that information to the area of memory specified
by the buf parameter. The device parameter is a pointer
to a string that contains the name of a DOS Services
device.
The DOSUSTAT structure is defined in /usr/include/dos.h
and has the following format:
typedef struct
{
char upath[128|; /* Device or file specified in configuration */
char umount[128|; /* AIX directory mounted on it, or NULL */
char volume[32|; /* Volume name */
int freespace; /* Number of free bytes */
char fstype; /* AIX file system='u', DOS file system='d' */
} DOSUSTAT;
The umount structure member is not NULL only when the
upath field identifies a device name (such as /dev/fd0),
and that device contains a mountable AIX file system.
The volume, freespace, and fstype members are set only
when the device parameter is a disk name (a single letter
followed by a colon). If the device is a removable disk,
umount may read it to determine if it is a valid DOS or
AIX file system.
Return Value
Upon successful completion, a value of 0 is returned. If
the dosustat subroutine fails, a value of -1 is returned
and doserrno is set to indicate the error.
Related Information
In this book: "DOS services library," "dosstat,
dosfstat," and "ustat."