const char *name, mode_t mode, struct stat *st,
struct rgw_file_handle *handle)
{
- string uri;
int rc;
+ string uri;
rc = librgw.get_uri(parent_handle->handle, uri);
if (rc < 0 ) { /* invalid parent */
uri += "/";
uri += name;
RGWCreateBucketRequest req(cct, fs->get_user(), uri);
- (void) librgw.get_fe()->execute_req(&req);
-
- /* TODO: result */
+ rc = librgw.get_fe()->execute_req(&req);
- return 0;
+ return rc;
}
/*
const struct rgw_file_handle *parent_handle, uint64_t *offset,
rgw_readdir_cb rcb, void *cb_arg, bool *eof)
{
- string uri;
int rc;
+ string uri;
rc = librgw.get_uri(parent_handle->handle, uri);
if (rc < 0 ) { /* invalid parent */
if (is_root(uri)) {
/* for now, root always contains one user's bucket namespace */
RGWListBucketsRequest req(cct, fs->get_user(), rcb, cb_arg, offset);
- (void) librgw.get_fe()->execute_req(&req);
+ rc = librgw.get_fe()->execute_req(&req);
} else {
/*
* bucket?
*/
uri += "/";
-
RGWListBucketRequest req(cct, fs->get_user(), uri, rcb, cb_arg, offset);
- (void) librgw.get_fe()->execute_req(&req);
+ rc = librgw.get_fe()->execute_req(&req);
}
- /* TODO: result */
-
+ /* XXXX request MUST set this */
*eof = true; // XXX move into RGGWListBucket(s)Request
- return 0;
+ return rc;
}
/*
static_cast<RGWLibProcess*>(pprocess)->enqueue_req(req); // async
}
- inline void execute_req(RGWLibRequest* req) {
- static_cast<RGWLibProcess*>(pprocess)->process_request(req); // !async
+ inline int execute_req(RGWLibRequest* req) {
+ return static_cast<RGWLibProcess*>(pprocess)->process_request(req); // !async
}
}; /* RGWLibFrontend */