mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-05 15:55:45 +00:00
Merge pull request #44 from hughsie/wip/superm1/reorder-get-devices
Re-order output of get-devices to be easier to read
This commit is contained in:
commit
cfad8da070
@ -30,6 +30,7 @@
|
||||
#define FWUPD_RESULT_KEY_DEVICE_CHECKSUM_KIND "DeviceChecksumKind" /* u */
|
||||
#define FWUPD_RESULT_KEY_DEVICE_MODIFIED "Modified" /* t */
|
||||
#define FWUPD_RESULT_KEY_DEVICE_NAME "DisplayName" /* s */
|
||||
#define FWUPD_RESULT_KEY_DEVICE_ID "DeviceID" /* s */
|
||||
#define FWUPD_RESULT_KEY_DEVICE_PROVIDER "Provider" /* s */
|
||||
#define FWUPD_RESULT_KEY_DEVICE_VERSION "Version" /* s */
|
||||
#define FWUPD_RESULT_KEY_DEVICE_VERSION_LOWEST "VersionLowest" /* s */
|
||||
|
@ -1600,11 +1600,11 @@ fwupd_result_to_string (FwupdResult *result)
|
||||
|
||||
/* not set when using GetDetails */
|
||||
if (priv->device_id != NULL)
|
||||
g_string_append_printf (str, "%s\n", priv->device_id);
|
||||
g_string_append_printf (str, "%s\n", priv->device_name);
|
||||
|
||||
/* device */
|
||||
fwupd_pad_kv_str (str, FWUPD_RESULT_KEY_GUID, priv->guid);
|
||||
fwupd_pad_kv_str (str, FWUPD_RESULT_KEY_DEVICE_NAME, priv->device_name);
|
||||
fwupd_pad_kv_str (str, FWUPD_RESULT_KEY_DEVICE_ID, priv->device_id);
|
||||
fwupd_pad_kv_str (str, FWUPD_RESULT_KEY_DEVICE_DESCRIPTION, priv->device_description);
|
||||
fwupd_pad_kv_str (str, FWUPD_RESULT_KEY_DEVICE_PROVIDER, priv->device_provider);
|
||||
fwupd_pad_kv_dfl (str, FWUPD_RESULT_KEY_DEVICE_FLAGS, priv->device_flags);
|
||||
|
@ -125,9 +125,9 @@ fwupd_result_func (void)
|
||||
g_print ("\n%s", str);
|
||||
|
||||
ret = as_test_compare_lines (str,
|
||||
"USB:foo\n"
|
||||
"ColorHug2\n"
|
||||
" Guid: 2082b5e0-7a64-478a-b1b2-e3404fab6dad\n"
|
||||
" DisplayName: ColorHug2\n"
|
||||
" DeviceID: USB:foo\n"
|
||||
" Flags: allow-offline|require-ac\n"
|
||||
" FirmwareHash: beefdead\n"
|
||||
" DeviceChecksumKind: sha256\n"
|
||||
|
@ -848,7 +848,7 @@ fu_util_get_results (FuUtilPrivate *priv, gchar **values, GError **error)
|
||||
g_set_error_literal (error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_INVALID_ARGS,
|
||||
"Invalid arguments: expected 'id'");
|
||||
"Invalid arguments: expected 'DeviceID'");
|
||||
return FALSE;
|
||||
}
|
||||
res = fwupd_client_get_results (priv->client, values[0], NULL, error);
|
||||
@ -1283,4 +1283,3 @@ out:
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user