User Guide
Ampex 1308910-01 2-3
ACL Software Overview libacl API Overview
2.4 libacl API Overview
The
libacl
API features simple, compact, and direct functions to control or obtain data from
an ACL. Detailed knowledge of the hardware and SCSI interface are not necessary.
2.4.1 Operation of libacl
The
libacl
API layer packages SCSI ACL commands as C functions, isolating the caller from
the device driver layer. C programs that use the
libacl
API normally use the C preprocessor
#include
directive to include the following header file.
acl.h
Contains the
libacl
function prototypes and provides several useful
definitions. The
acl.h
header file must be included by application
using the libacl API.
To link your application, reference the
libacl
in
/usr/lib
.
2.4.2 Function Return Values
All
libacl
API functions except aclAuditElement() and aclAuditLibrary () return
0 on
success or
-1 on failure. The two audit functions return 0 on failure or the number of
elements they are reporting status for on success.
2.4.3 Errors
See “Return Values” on page 4-2 for information on libacl error reporting.
2.4.4 UNIX Platform Compatibility
All libacl functions operate consistently across supported platforms.
2.4.5 Open behavior
The libacl API handles the opening and closing of the ACL. Typical errno codes are shown
below for common errors that can occur on open. See your host system documentation for the
errno values reported by your system.
EBUSY ACL is already in use.
EINVAL Invalid argument supplied.
ENODEV The ACL device is not properly connected to the host system.