lib/fw.c
/**
 * @brief Set or clear a boot partition's read-only flag
 * @param[in]  dev	Switchtec device handle
 * @param[in]  ro	Whether to set or clear the read-only flag
 * @return 0 on success, error code on failure
 */
@brief Set or clear a boot partition's read-only flag
@param[in]  dev      Switchtec device handle
@param[in]  ro       Whether to set or clear the read-only flag
@return 0 on success, error code on failure
@brief Set or clear a boot partition ' s read - only flag @param [ in ] dev Switchtec device handle @param [ in ] ro Whether to set or clear the read - only flag @return 0 on success error code on failure
int switchtec_fw_set_boot_ro(struct switchtec_dev *dev,
			     enum switchtec_fw_ro ro)
{
	struct switchtec_boot_ro subcmd = {
		.subcmd = MRPC_FWDNLD_BOOT_RO,
		.set_get = 1,
		.status = ro,
	};
	return switchtec_cmd(dev, MRPC_FWDNLD, &subcmd, sizeof(subcmd),
			     NULL, 0);
}
int switchtec_fw_set_boot_ro ( struct switchtec_dev * dev , enum switchtec_fw_ro ro ) { struct switchtec_boot_ro subcmd = { . subcmd = MRPC_FWDNLD_BOOT_RO , . set_get = 1 , . status = ro , } ; return switchtec_cmd ( dev , MRPC_FWDNLD , & subcmd , sizeof ( subcmd ) , NULL , 0 ) ; }
@brief Set or clear a boot partition's read-only flag
 @param[in]  dev      Switchtec device handle
 @param[in]  ro       Whether to set or clear the read-only flag
 @return 0 on success, error code on failure
@brief Set or clear a boot partition ' s read - only flag @param [ in ] dev Switchtec device handle @param [ in ] ro Whether to set or clear the read - only flag @return 0 on success error code on failure