Allow defining update vfuncs with no runtime support

This allows providers to decide at runtime if a device can be updated online.
This commit is contained in:
Richard Hughes 2016-03-10 20:02:23 +00:00
parent 935769bf4d
commit 780a3e59ff

View File

@ -253,6 +253,13 @@ fu_provider_update (FuProvider *provider,
/* online */
if (klass->update_online == NULL) {
g_set_error_literal (error,
FWUPD_ERROR,
FWUPD_ERROR_NOT_SUPPORTED,
"Online update was not possible");
return FALSE;
}
if ((flags & FU_PROVIDER_UPDATE_FLAG_ONLINE) == 0) {
g_set_error_literal (error,
FWUPD_ERROR,
FWUPD_ERROR_NOT_SUPPORTED,