sam_stat, sam_lstat - Gets file status over a network connection
cc [
flag
… ]
file
… -L∕opt∕SUNWsamfs∕lib -lsamrpc [ -lnsl ] [
library … ]
#include "∕opt∕SUNWsamfs∕include∕stat.h" #include "∕opt∕SUNWsamfs∕include∕samrpc.h"
int sam_stat(const char *
path ,
struct sam_stat *
buf );
int sam_lstat(const char *
path ,
struct sam_stat *
buf );
The
-lnsl
is needed after the
-lsamrpc
when building on Solaris systems.
These are the RPC-based versions of
sam_stat
(3x)
and
sam_lstat
(3x).
sam_stat
(3x)
and
sam_lstat
(3x)
get file status by sending a request to the StorageTek QFS or Oracle HSM RPC server, sam-rpcd
.
If the server machine is different from the local machine, path must be an absolute path. If the server machine is the local machine, path may be an absolute path or relative to the user's current working directory.
If the file has a message-digest set using an extended algorithm, the hash
value must retrieved separately using the
sam_getdigest
(3x)
function.
A call to
sam_initrpc
(3x)
must be issued before these calls.
Upon successful completion a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.
EDESTADDRREQ
sam_initrpc
was not successfully called, as required, before making this call.
EINVAL
path is not an absolute pathname and the server (SAMHOST) machine is not the same as the local machine.