### Method

# FwupdPlugin Ioctl add_const_buffer

since: 2.0.2

#### Declaration [src]

    void
    fu_ioctl_add_const_buffer (
      FuIoctl* self,
      const gchar* key,
      const guint8* buf,
      gsize bufsz,
      FuIoctlFixupFunc fixup_cb
    )

#### Description [src]

Adds a constant buffer that can be used to fix up the ioctl-defined structure with the buffer and size, and adds a key for the emulation.

Available since: 2.0.2

#### Parameters

`key`

  Type: `const gchar*`

  A string, e.g. `Cdb`.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`buf`

  Type: `const guint8*`

  An optional buffer.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`bufsz`

  Type: `gsize`

  Size of `buf`.

`fixup_cb`

  Type: `FuIoctlFixupFunc`

  A function to call on the structure.