From a9d893d55b587b602a37d5adffdcba6dc29b9486 Mon Sep 17 00:00:00 2001 From: Amithash Prasad Date: Tue, 2 Jan 2024 10:48:33 -0800 Subject: [PATCH] grandteton: Fix error in detecting HGX Presence Summary: We were handling the wrong exception. kv::get() throws std::filesystem::filesystem_error and not kv::key_does_not_exist. Test Plan: Copy libhgx package onto system and ensure we can run fw-util hgx --version. Reviewed By: williamspatrick Differential Revision: D52485981 fbshipit-source-id: 133fdb939ff410a01fc4d23d5430fb7d85f6bd1b --- .../meta-grandteton/recipes-grandteton/hgx/files/hgx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-facebook/meta-grandteton/recipes-grandteton/hgx/files/hgx.cpp b/meta-facebook/meta-grandteton/recipes-grandteton/hgx/files/hgx.cpp index 2b4824a5214..02525f7883c 100644 --- a/meta-facebook/meta-grandteton/recipes-grandteton/hgx/files/hgx.cpp +++ b/meta-facebook/meta-grandteton/recipes-grandteton/hgx/files/hgx.cpp @@ -157,7 +157,7 @@ GPUConfig getConfig() { } else { return GPU_CONFIG_UNKNOWN; } - } catch (kv::key_does_not_exist& e) { + } catch (std::filesystem::filesystem_error& e) { const int hgx_eeprom_bus = 0x9; int fd = 0; uint8_t tlen, rlen;