Lines Matching defs:rc
37 ESR_ReturnCode rc;
42 rc = ESR_OUT_OF_MEMORY;
43 PLogError(ESR_rc2str(rc));
73 return rc;
78 ESR_ReturnCode rc;
80 CHK(rc, PFileDestroyImpl(self));
84 return rc;
89 #define LOCK_MUTEX(rc, impl) \
91 CHKLOG(rc, PtrdMonitorLock(impl->Interface.lock));
93 #define LOCK_MUTEX(rc, impl)
98 #define CLEANUP_AND_RETURN(rc, impl) \
100 CHKLOG(rc, PtrdMonitorUnlock(impl->Interface.lock)); \
105 return rc;
107 #define CLEANUP_AND_RETURN(rc, impl) \
110 return rc;
117 ESR_ReturnCode rc;
119 LOCK_MUTEX(rc, impl);
122 rc = ESR_ALREADY_OPEN;
123 PLogError(ESR_rc2str(rc));
134 CHKLOG(rc, PFileSystemGetcwd(path, &len));
135 rc = ESR_OPEN_ERROR;
136 /* PLOG_DBG_TRACE((L("%s: filename=%s, cwd=%s"), ESR_rc2str(rc), impl->Interface.filename, path)); */
137 PLogError(L("%s: filename=%s, cwd=%s"), ESR_rc2str(rc), impl->Interface.filename, path);
140 CLEANUP_AND_RETURN(rc, impl);
146 ESR_ReturnCode rc;
148 LOCK_MUTEX(rc, impl);
151 rc = ESR_CLOSE_ERROR;
152 PLogMessage(L("%s: file %s, handle"), ESR_rc2str(rc), impl->Interface.filename, impl->value);
156 CLEANUP_AND_RETURN(rc, impl);
162 ESR_ReturnCode rc;
164 LOCK_MUTEX(rc, impl);
167 rc = ESR_INVALID_ARGUMENT;
168 PLogError(ESR_rc2str(rc));
179 rc = ESR_READ_ERROR;
180 PLogMessage(ESR_rc2str(rc));
195 CLEANUP_AND_RETURN(rc, impl);
201 ESR_ReturnCode rc;
204 LOCK_MUTEX(rc, impl);
207 rc = ESR_INVALID_ARGUMENT;
208 PLogError(ESR_rc2str(rc));
226 rc = ESR_OUT_OF_MEMORY;
227 PLogError(ESR_rc2str(rc));
246 rc = ESR_WRITE_ERROR;
247 PLogMessage(ESR_rc2str(rc));
253 CLEANUP_AND_RETURN(rc, impl);
259 ESR_ReturnCode rc;
261 LOCK_MUTEX(rc, impl);
264 rc = ESR_FLUSH_ERROR;
265 PLogMessage(ESR_rc2str(rc));
268 CLEANUP_AND_RETURN(rc, impl);
274 ESR_ReturnCode rc;
276 LOCK_MUTEX(rc, impl);
279 rc = ESR_SEEK_ERROR;
280 PLogMessage(ESR_rc2str(rc));
283 CLEANUP_AND_RETURN(rc, impl);
289 ESR_ReturnCode rc;
292 LOCK_MUTEX(rc, impl);
299 rc = ESR_INVALID_STATE;
300 PLogError(L("%s: Got EBADF"), rc);
303 rc = ESR_INVALID_STATE;
304 PLogError(L("%s: Got EINVAL"), rc);
307 rc = ESR_INVALID_STATE;
308 PLogError(ESR_rc2str(rc));
313 CLEANUP_AND_RETURN(rc, impl);
319 ESR_ReturnCode rc;
321 LOCK_MUTEX(rc, impl);
324 rc = ESR_INVALID_ARGUMENT;
325 PLogError(ESR_rc2str(rc));
329 CLEANUP_AND_RETURN(rc, impl);
335 ESR_ReturnCode rc;
337 LOCK_MUTEX(rc, impl);
340 rc = ESR_INVALID_ARGUMENT;
341 PLogError(ESR_rc2str(rc));
358 CLEANUP_AND_RETURN(rc, impl);
364 ESR_ReturnCode rc;
366 LOCK_MUTEX(rc, impl);
369 rc = ESR_INVALID_ARGUMENT;
370 PLogError(ESR_rc2str(rc));
374 CLEANUP_AND_RETURN(rc, impl);
380 ESR_ReturnCode rc;
382 LOCK_MUTEX(rc, impl);
384 CLEANUP_AND_RETURN(rc, impl);
390 ESR_ReturnCode rc;
393 LOCK_MUTEX(rc, impl);
399 rc = ESR_INVALID_STATE;
400 PLogMessage(ESR_rc2str(rc));
403 CLEANUP_AND_RETURN(rc, impl);
409 ESR_ReturnCode rc;
411 LOCK_MUTEX(rc, impl);
415 rc = ESR_INVALID_STATE;
416 PLogMessage(ESR_rc2str(rc));
419 CLEANUP_AND_RETURN(rc, impl);
425 ESR_ReturnCode rc;
427 LOCK_MUTEX(rc, impl);
428 rc = PMemLogFree(self);
429 if (rc != ESR_SUCCESS)
431 pfprintf(PSTDERR, L("%s: PMemDumpLogFile() at %s:%d"), ESR_rc2str(rc), __FILE__, __LINE__);
434 rc = PMemLogFree(impl->Interface.filename);
435 if (rc != ESR_SUCCESS)
437 pfprintf(PSTDERR, L("%s: PMemDumpLogFile() at %s:%d"), ESR_rc2str(rc), __FILE__, __LINE__);
441 rc = PMemLogFree(impl->Interface.lock);
442 if (rc != ESR_SUCCESS)
444 pfprintf(PSTDERR, L("%s: PMemDumpLogFile() at %s:%d"), ESR_rc2str(rc), __FILE__, __LINE__);
448 CLEANUP_AND_RETURN(rc, impl);