Skip Headers
Oracle Hierarchical Storage Manager and QFS Software Command Reference
Section 3: Introduction to Library Functions
Release 6.1.1
E70305-03

NAME

sam_mig_stage_write - Stages data from foreign data migration program

SYNOPSIS

cc [ flag … ] file … -L∕opt∕SUNWsamfs∕lib -lsamut [ library … ]

#include "∕opt∕SUNWsamfs∕include∕mig.h"

int sam_mig_stage_write(tp_stage_t * stage_req , char * buffer , int len , offset_t offset );

AVAILABILITY

SUNWsamfs

DESCRIPTION

sam_mig_stage_write() passes data from the foreign data migration program to the file system for the stage associated with stage_req (see sam_mig_stage_file (3)). stage_req is the number of this stage request. buffer is a pointer to the data that needs to be transferred. len is the number of bytes of data to transfer. offset is the offset from the beginning of this stage request. This is not the offset from the beginning of the file (keep in mind stage_never).

RETURN VALUES

sam_mig_stage_write returns the actual number of bytes written. Otherwise, a value of -1 is returned. If an error is returned, sam_mig_stage_end should still be called. The only function allowed on stage_req after an error is sam_mig_stage_end.

FILES

∕opt∕SUNWsamfs∕migkit∕mig_cd.c

The example Migration Toolkit program

∕etc∕opt∕SUNWsamfs∕mcf

The configuration file for StorageTek QFS or Oracle HSM

SEE ALSO

sam_mig_stage_end (3), sam_mig_stage_file (3)