sam_archive - Sets archive attributes on a file or directory
cc [ flag
… ] file
… -L∕opt∕SUNWsamfs∕lib -lsamrpc [ -lnsl ] [ library … ]
#include "∕opt∕SUNWsamfs∕include∕samrpc.h"
int sam_archive(const char * path ,
const char * ops );
The
-lnsl
is needed after the
-lsamrpc
when building on Solaris systems.
This is the RPC-based version of
sam_archive (3x),
allowing archive attributes on a file or directory to be set from a remote
machine.
sam_archive (3x)
sets archive attributes on a file or directory by
sending its request to the StorageTek QFS or Oracle HSM RPC server,
sam-rpcd.
A call to
sam_initrpc (3x)
must be issued before calling this routine.
Upon successful completion a value of 0 is returned.
Otherwise, a value of -1 is returned and
errno
is set to indicate the error.
EDESTADDRREQsam_initrpc
was not successfully called, as required, before making this call.