A struct s_hardware is far too large to be placed onto the stack and
was causing us run past the end of the allocated stack and overwrite
the diskcache, which resulted in apparent file system corruption.
Move this hefty object into the bss.
Cc: Erwan Velu <erwanaliasr1@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
int main(const int argc, const char *argv[])
{
char version_string[256];
- struct s_hardware hardware;
+ static struct s_hardware hardware;
snprintf(version_string, sizeof version_string, "%s %s (%s)",
PRODUCT_NAME, VERSION, CODENAME);