Lines Matching defs:handler

33 static int openfile_mkstemp(IoErrorHandler &handler) {
55 handler.SignalErrno();
64 Position position, IoErrorHandler &handler) {
69 CloseFd(handler);
72 handler.SignalError("FILE= must not appear with STATUS='SCRATCH'");
78 fd_ = openfile_mkstemp(handler);
81 handler.SignalError("FILE= is required");
128 handler.SignalErrno();
132 RUNTIME_CHECK(handler, action.has_value());
135 handler.SignalError(IostatOpenBadAppend);
175 void OpenFile::Close(CloseStatus status, IoErrorHandler &handler) {
188 CloseFd(handler);
192 std::size_t maxBytes, IoErrorHandler &handler) {
196 CheckOpen(handler);
197 if (!Seek(at, handler)) {
209 handler.SignalError(err);
221 std::size_t bytes, IoErrorHandler &handler) {
225 CheckOpen(handler);
226 if (!Seek(at, handler)) {
238 handler.SignalError(err);
257 void OpenFile::Truncate(FileOffset at, IoErrorHandler &handler) {
258 CheckOpen(handler);
261 handler.SignalErrno();
271 FileOffset at, char *buffer, std::size_t bytes, IoErrorHandler &handler) {
272 CheckOpen(handler);
278 auto chunk{Seek(at, handler) ? ::read(fd_, buffer + got, bytes - got) : -1};
295 return PendingResult(handler, iostat);
300 std::size_t bytes, IoErrorHandler &handler) {
301 CheckOpen(handler);
308 Seek(at, handler) ? ::write(fd_, buffer + put, bytes - put) : -1};
321 return PendingResult(handler, iostat);
324 void OpenFile::Wait(int id, IoErrorHandler &handler) {
339 handler.SignalError(*ioStat);
343 void OpenFile::WaitAll(IoErrorHandler &handler) {
352 handler.SignalError(ioStat);
374 bool OpenFile::Seek(FileOffset at, IoErrorHandler &handler) {
381 handler.SignalError(IostatCannotReposition);
414 void OpenFile::CloseFd(IoErrorHandler &handler) {
420 handler.SignalErrno();