fastbootd: Allow returning errors from getvar handlers.

Currently a few getvar handlers will return invalid strings when an
error occurs. This change allows those handlers to instead send a proper
failure message.

Bug: 78793464
Test: N/A
Change-Id: I7ff7d036c1e6fb0a3d700ecf21b1103ab77278d2
diff --git a/fastboot/device/variables.h b/fastboot/device/variables.h
index 09ef8ec..45c6dc9 100644
--- a/fastboot/device/variables.h
+++ b/fastboot/device/variables.h
@@ -21,16 +21,16 @@
 
 class FastbootDevice;
 
-std::string GetVersion(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetBootloaderVersion(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetBasebandVersion(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetProduct(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetSerial(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetSecure(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetCurrentSlot(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetSlotCount(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetSlotSuccessful(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetSlotUnbootable(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetMaxDownloadSize(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetUnlocked(FastbootDevice* device, const std::vector<std::string>& args);
-std::string GetHasSlot(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetVersion(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetBootloaderVersion(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetBasebandVersion(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetProduct(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetSerial(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetSecure(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetCurrentSlot(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetSlotCount(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetSlotSuccessful(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetSlotUnbootable(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetMaxDownloadSize(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetUnlocked(FastbootDevice* device, const std::vector<std::string>& args);
+bool GetHasSlot(FastbootDevice* device, const std::vector<std::string>& args);