From 780a3e59ff8ecc38e3d1b2be60b66e45d08b3bdc Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 10 Mar 2016 20:02:23 +0000 Subject: [PATCH] Allow defining update vfuncs with no runtime support This allows providers to decide at runtime if a device can be updated online. --- src/fu-provider.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fu-provider.c b/src/fu-provider.c index d3ee799fc..6c52253ae 100644 --- a/src/fu-provider.c +++ b/src/fu-provider.c @@ -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,