update: fix some defines for ARM_HARDWARE

Origin commit data
------------------
Commit: d09f93645f
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-12-26 (Tue, 26 Dec 2017)

Origin message was:
------------------
- update: fix some defines for ARM_HARDWARE
This commit is contained in:
vanhofen
2017-12-26 00:36:06 +01:00
parent a4ad7dfde1
commit 132ff1b687

View File

@@ -90,14 +90,22 @@ extern int allow_flash;
#define gUserAgent "neutrino/softupdater 1.0" #define gUserAgent "neutrino/softupdater 1.0"
#define LIST_OF_UPDATES_LOCAL_FILENAME "update.list" #define LIST_OF_UPDATES_LOCAL_FILENAME "update.list"
#define FILEBROWSER_UPDATE_FILTER "img"
// TODO: move this mess below to libstb-hal
#if HAVE_ARM_HARDWARE
#define FILEBROWSER_UPDATE_FILTER "tgz"
#define MTD_OF_WHOLE_IMAGE 999
#define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd999"
#else
#define FILEBROWSER_UPDATE_FILTER "img"
#define MTD_OF_WHOLE_IMAGE 0 #define MTD_OF_WHOLE_IMAGE 0
#ifdef BOXMODEL_CS_HD2 #ifdef BOXMODEL_CS_HD2
#define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd0" #define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd0"
#else #else
#define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd3" #define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd3"
#endif #endif
#endif
int pinghost (const std::string &hostname, std::string *ip = NULL); int pinghost (const std::string &hostname, std::string *ip = NULL);
CFlashUpdate::CFlashUpdate() CFlashUpdate::CFlashUpdate()
@@ -461,10 +469,6 @@ bool CFlashUpdate::checkVersion4Update()
for(size_t i=0; i<sizeof(filters)/sizeof(filters[0]) ;i++) for(size_t i=0; i<sizeof(filters)/sizeof(filters[0]) ;i++)
UpdatesFilter.addFilter(filters[i]); UpdatesFilter.addFilter(filters[i]);
#if HAVE_ARM_HARDWARE
UpdatesFilter.addFilter("tgz");
#endif
UpdatesBrowser.Filter = &UpdatesFilter; UpdatesBrowser.Filter = &UpdatesFilter;
CFile * file_selected = NULL; CFile * file_selected = NULL;