IOSHandle * GlibIOStore::Open(const char *path, int flags, mode_t mode, int &ret) { GlibIOSHandle *hand = new GlibIOSHandle(path, this->buffsize); ret = hand->Open(flags,mode); if (ret == 0) { return hand; } else { delete hand; return NULL; } assert(0); return NULL; }
plfs_error_t GlibIOStore::Open(const char *path, int flags, mode_t mode, IOSHandle **ret_hand) { plfs_error_t ret; GlibIOSHandle *hand = new GlibIOSHandle(path, this->buffsize); ret = hand->Open(flags,mode); if (ret == PLFS_SUCCESS) { *ret_hand = hand; return PLFS_SUCCESS; } else { delete hand; *ret_hand = NULL; return ret; } assert(0); return ret; }