### Function

# FwupdPlugin kenv_get_string

#### Declaration [src]

    gchar*
    fu_kenv_get_string (
      const gchar* key,
      GError** error
    )

#### Description [src]

Gets a BSD kernel environment string. This will not work on Linux or Windows.

Available since: | 1.6.1

#### Parameters

`key` | `const gchar*`
| A kenv key, e.g. `smbios.bios.version`
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `gchar*`
| A string, or `NULL` if the `key` was not found.
| The caller of the function takes ownership of the data, and is responsible for freeing it.
| The value is a NUL terminated UTF-8 string.