int phybunUtil (rcComm_t *conn, rodsEnv *myRodsEnv, rodsArguments_t *myRodsArgs, rodsPathInp_t *rodsPathInp) { int i; int status; int savedStatus = 0; rodsPath_t *collPath; structFileExtAndRegInp_t phyBundleCollInp; if (rodsPathInp == NULL) { return (USER__NULL_INPUT_ERR); } status = initCondForPhybunOpr (myRodsEnv, myRodsArgs, &phyBundleCollInp, rodsPathInp); if (status < 0) return status; for (i = 0; i < rodsPathInp->numSrc; i++) { collPath = &rodsPathInp->srcPath[i]; /* iRODS Collection */ getRodsObjType (conn, collPath); if (collPath->objType != COLL_OBJ_T) { rodsLogError (LOG_ERROR, status, "phybunUtil: input path %s is not a collection", collPath->outPath); return USER_INPUT_PATH_ERR; } rstrcpy (phyBundleCollInp.collection, collPath->outPath, MAX_NAME_LEN); status = rcPhyBundleColl (conn, &phyBundleCollInp); if (status < 0) { rodsLogError (LOG_ERROR, status, "phybunUtil: opr error for %s, status = %d", collPath->outPath, status); savedStatus = status; } } if (savedStatus < 0) { return (savedStatus); } else if (status == CAT_NO_ROWS_FOUND) { return (0); } else { return (status); } }
int remotePhyBundleColl( rsComm_t *rsComm, structFileExtAndRegInp_t *phyBundleCollInp, rodsServerHost_t *rodsServerHost ) { int status; if ( rodsServerHost == NULL ) { rodsLog( LOG_NOTICE, "remotePhyBundleColl: Invalid rodsServerHost" ); return SYS_INVALID_SERVER_HOST; } if ( ( status = svrToSvrConnect( rsComm, rodsServerHost ) ) < 0 ) { return status; } status = rcPhyBundleColl( rodsServerHost->conn, phyBundleCollInp ); return status; }