Additional change to support ee1004 driver
changed the code to remove hardcoding of driver
changed read parser executable to take driver as input
Change-Id: I6909e2d56d4572e3ff78610248683a75337bbd72
Signed-off-by: jinuthomas <jinu.joy.thomas@in.ibm.com>
diff --git a/ibm_vpd_utils.cpp b/ibm_vpd_utils.cpp
index 388d869..8d93606 100644
--- a/ibm_vpd_utils.cpp
+++ b/ibm_vpd_utils.cpp
@@ -533,7 +533,7 @@
return jsonPath;
}
-void udevToGenericPath(std::string& file)
+void udevToGenericPath(std::string& file, const std::string& driver)
{
// Sample udevEvent i2c path :
// "/sys/devices/platform/ahb/ahb:apb/ahb:apb:bus@1e78a000/1e78a480.i2c-bus/i2c-8/8-0051/8-00510/nvmem"
@@ -560,7 +560,7 @@
exit(EXIT_SUCCESS);
}
// Forming the generic file path
- file = i2cPathPrefix + i2cBusAddr + "/eeprom";
+ file = i2cPathPrefix + driver + "/" + i2cBusAddr + "/eeprom";
}
// Sample udevEvent spi path :
// "/sys/devices/platform/ahb/ahb:apb/1e79b000.fsi/fsi-master/fsi0/slave@00:00/00:00:00:04/spi_master/spi2/spi2.0/spi2.00/nvmem"
@@ -588,7 +588,7 @@
exit(EXIT_SUCCESS);
}
// Forming the generic path
- file = spiPathPrefix + spiBus + ".0/eeprom";
+ file = spiPathPrefix + driver + "/" + spiBus + ".0/eeprom";
}
else
{