Function

Fwupdguid_from_string

since: 1.2.5

Declaration [src]

gboolean
fwupd_guid_from_string (
  const gchar* guidstr,
  guint8* guid,
  FwupdGuidFlags flags,
  GError** error
)

Description [src]

Converts a string GUID into its binary encoding. All string GUIDs are formatted as big endian but on-disk can be encoded in different ways.

Available since: 1.2.5

Parameters

guidstr

Type: const gchar*

A GUID, e.g. 00112233-4455-6677-8899-aabbccddeeff

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

Type: guint8*

A #fwupd_guid_t, or NULL to just check the GUID.

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

Type: FwupdGuidFlags

GUID flags, e.g. FWUPD_GUID_FLAG_MIXED_ENDIAN.

error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will left initialized to NULL by the function if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE for success.