libcsdbg  1.28
C++ exception (and generic) stack trace debug library
sttybuf & csdbg::sttybuf::flush ( )
virtual

Flush the buffered data to the serial interface.

Returns
*this
Exceptions
csdbg::exception

Implements csdbg::streambuf.

Definition at line 304 of file sttybuf.cpp.

References discard(), csdbg::streambuf::flush(), m_devnode, and sync().

305 {
306  try {
308  return sync();
309  }
310 
311  catch (i32 err) {
312  discard();
313  throw exception(
314  "failed to send data to serial interface '%s' (errno %d - %s)",
315  m_devnode,
316  err,
317  strerror(err)
318  );
319  }
320 }
virtual streambuf & flush()=0
To be implemented.
Definition: streambuf.cpp:156
virtual sttybuf & sync() const
Commit cached data to the serial interface line.
Definition: sttybuf.cpp:330
virtual sttybuf & discard() const
Discard the data cached in the serial interface (in-kernel) buffers.
Definition: sttybuf.cpp:355
i8 * m_devnode
Device node file (devfs)
Definition: sttybuf.hpp:34
int i32
32-bit signed integer
Definition: config.hpp:82

+ Here is the call graph for this function: