ADIC Server Server User Manual


 
4-20 DAS ACI Functions
601626-B
Return Values
The aci_driveaccess returns the following values:
0: The call was successful.
-1: The call failed.
The external variable d_errno is set to one of the following DAS
error codes:
ERPC
EINVALID
ENODRIVE
EDRVOCCUPIED
ENOTHAUTH
EUPELSE
EBADCLIENT
ENOTAUTH
ETIMEOUT
ESWITCHINPROG
EEXUP
EDASINT
See Figure 4-14 for an example of the aci_driveaccess function.
Figure 4-14 Example of the aci_driveaccess Function
/* Allocate a drive for client use */
int rc = 0;
char *client = "SomeClient";
char *drive = "Drive1";
enum aci_drive_status status;
status = ACI_DRIVE_UP;
if (( rc = aci_driveaccess( client, drive, status ) ))
{
aci_perror( "Drive allocation failed: " );
}
else
{
printf( "Allocation of %s for %s successful\n",
drive, client );
}