Skip to content

Commit

Permalink
More fancy stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
nefarius committed Aug 6, 2024
1 parent 4cb2ebf commit a639202
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Devcon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ bool devcon::create(const std::wstring& className, const GUID* classGuid, const
return success;
}

std::expected<bool, Win32Error> devcon::update(const std::wstring& hardwareId, const std::wstring& fullInfPath,
std::expected<void, Win32Error> devcon::update(const std::wstring& hardwareId, const std::wstring& fullInfPath,
bool* rebootRequired, bool force)
{
Newdev newdev;
Expand All @@ -206,7 +206,7 @@ std::expected<bool, Win32Error> devcon::update(const std::wstring& hardwareId, c
case FunctionCallResult::Success:
if (rebootRequired)
*rebootRequired = reboot > 0;
return true;
return {};
}

return std::unexpected(Win32Error(ERROR_INTERNAL_ERROR));
Expand Down
2 changes: 1 addition & 1 deletion src/Devcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace devcon
*/
bool create(const std::wstring& className, const GUID* classGuid, const std::wstring& hardwareId);

std::expected<bool, nefarius::util::Win32Error> update(const std::wstring& hardwareId, const std::wstring& fullInfPath, bool* rebootRequired, bool force = false);
std::expected<void, nefarius::util::Win32Error> update(const std::wstring& hardwareId, const std::wstring& fullInfPath, bool* rebootRequired, bool force = false);

bool restart_bth_usb_device();

Expand Down

0 comments on commit a639202

Please sign in to comment.