trivial: Add the missing device flag to string functionality

This commit is contained in:
Richard Hughes 2017-08-25 15:53:05 +01:00
parent 1283003f2f
commit e116e2a6a6

View File

@ -120,6 +120,8 @@ fwupd_device_flag_to_string (FwupdDeviceFlags device_flag)
return "supported";
if (device_flag == FWUPD_DEVICE_FLAG_NEEDS_BOOTLOADER)
return "needs-bootloader";
if (device_flag == FWUPD_DEVICE_FLAG_REGISTERED)
return "registered";
if (device_flag == FWUPD_DEVICE_FLAG_UNKNOWN)
return "unknown";
return NULL;
@ -154,6 +156,8 @@ fwupd_device_flag_from_string (const gchar *device_flag)
return FWUPD_DEVICE_FLAG_SUPPORTED;
if (g_strcmp0 (device_flag, "needs-bootloader") == 0)
return FWUPD_DEVICE_FLAG_NEEDS_BOOTLOADER;
if (g_strcmp0 (device_flag, "registered") == 0)
return FWUPD_DEVICE_FLAG_REGISTERED;
return FWUPD_DEVICE_FLAG_UNKNOWN;
}