Method

FwupdPluginIOChannelread_raw

Declaration [src]

gboolean
fu_io_channel_read_raw (
  FuIOChannel* self,
  guint8* buf,
  gsize bufsz,
  gsize* bytes_read,
  guint timeout_ms,
  FuIOChannelFlags flags,
  GError** error
)

Description [src]

Reads bytes from the TTY, that will fail if exceeding timeout_ms.

Available since:1.2.2

Parameters

buf guint8*
 

Optional buffer.

 The argument can be NULL.
 The data is owned by the caller of the function.
bufsz gsize
 

Size of buf.

bytes_read gsize*
 

Data written to buf.

 The argument will be set by the function.
 The argument can be set to NULL.
 The instance takes ownership of the data, and is responsible for freeing it.
timeout_ms guint
 

Timeout in ms.

flags FuIOChannelFlags
 

Channel flags, e.g. FU_IO_CHANNEL_FLAG_SINGLE_SHOT.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

A GBytes, or NULL for error.