mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 08:18:10 +00:00
Add block erase command to FuCfiDevice
This commit is contained in:
parent
428f3d5b99
commit
53ed50e1c9
@ -51,6 +51,8 @@ fu_cfi_device_cmd_to_string(FuCfiDeviceCmd cmd)
|
||||
return "CfiDeviceCmdWriteEn";
|
||||
if (cmd == FU_CFI_DEVICE_CMD_WRITE_STATUS)
|
||||
return "CfiDeviceCmdWriteStatus";
|
||||
if (cmd == FU_CFI_DEVICE_CMD_BLOCK_ERASE)
|
||||
return "CfiDeviceCmdBlockErase";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -383,6 +385,12 @@ fu_cfi_device_set_quirk_kv(FuDevice *device, const gchar *key, const gchar *valu
|
||||
priv->cmds[FU_CFI_DEVICE_CMD_CHIP_ERASE] = tmp;
|
||||
return TRUE;
|
||||
}
|
||||
if (g_strcmp0(key, "CfiDeviceCmdBlockErase") == 0) {
|
||||
if (!fu_common_strtoull_full(value, &tmp, 0, G_MAXUINT8, error))
|
||||
return FALSE;
|
||||
priv->cmds[FU_CFI_DEVICE_CMD_BLOCK_ERASE] = tmp;
|
||||
return TRUE;
|
||||
}
|
||||
if (g_strcmp0(key, "CfiDeviceCmdSectorErase") == 0) {
|
||||
if (!fu_common_strtoull_full(value, &tmp, 0, G_MAXUINT8, error))
|
||||
return FALSE;
|
||||
|
@ -41,6 +41,7 @@ typedef enum {
|
||||
FU_CFI_DEVICE_CMD_SECTOR_ERASE,
|
||||
FU_CFI_DEVICE_CMD_WRITE_EN,
|
||||
FU_CFI_DEVICE_CMD_WRITE_STATUS,
|
||||
FU_CFI_DEVICE_CMD_BLOCK_ERASE,
|
||||
/*< private >*/
|
||||
FU_CFI_DEVICE_CMD_LAST
|
||||
} FuCfiDeviceCmd;
|
||||
|
Loading…
Reference in New Issue
Block a user