- rename BOXMODEL_CS => BOXMODEL_CST

Conflicts:
	data/scripts/Makefile.am
	src/gui/cam_menu.cpp
	src/gui/imageinfo_ni.cpp
	src/gui/osd_setup.cpp
	src/gui/update.cpp
	src/gui/update.h
	src/gui/update_menue.cpp
	src/neutrino.cpp
	src/system/setting_helpers.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2020-09-03 22:07:12 +02:00
committed by Thilo Graf
parent d29c98d7d5
commit a9882cdc22
34 changed files with 121 additions and 98 deletions

View File

@@ -105,7 +105,7 @@ extern int allow_flash;
#else
#define FILEBROWSER_UPDATE_FILTER "img"
#define MTD_OF_WHOLE_IMAGE 0
#ifdef BOXMODEL_CS_HD2
#ifdef BOXMODEL_CST_HD2
#define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd0"
#else
#define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd3"
@@ -363,8 +363,8 @@ bool CFlashUpdate::selectHttpImage(void)
file_md5 = md5s[selected];
fileType = fileTypes[selected];
gotImage = (fileType <= '9');
#if 0 //#ifdef BOXMODEL_CS_HD2
//#ifdef BOXMODEL_CST_HD2
#if 0
if (gotImage)
{
int esize = CMTDInfo::getInstance()->getMTDEraseSize(sysfs);
@@ -607,7 +607,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey)
if (fileType <= '9') // flashing image
{
#if ENABLE_EXTUPDATE
#ifndef BOXMODEL_CS_HD2
#ifndef BOXMODEL_CST_HD2
if (g_settings.apply_settings) {
if (ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_FLASHUPDATE_APPLY_SETTINGS, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_UPDATE) == CMsgBox::mbrYes)
if (!CExtUpdate::getInstance()->applySettings(filename, CExtUpdate::MODE_SOFTUPDATE)) {
@@ -781,7 +781,7 @@ CFlashExpert::CFlashExpert()
{
selectedMTD = -1;
width = 40;
#ifdef BOXMODEL_CS_HD2
#ifdef BOXMODEL_CST_HD2
forceOtherFilename = false;
otherFilename = "";
createimage_other = 0;
@@ -798,7 +798,7 @@ CFlashExpert* CFlashExpert::getInstance()
bool CFlashExpert::checkSize(int mtd, std::string &backupFile)
{
#ifndef BOXMODEL_CS_HD2
#ifndef BOXMODEL_CST_HD2
if (mtd < 0) return false;
#endif
char errMsg[1024] = {0};
@@ -812,7 +812,7 @@ bool CFlashExpert::checkSize(int mtd, std::string &backupFile)
uint64_t btotal = 0, bused = 0;
long bsize = 0;
uint64_t backupRequiredSize = 0;
#ifdef BOXMODEL_CS_HD2
#ifdef BOXMODEL_CST_HD2
if (mtd == -1) { // check disk space for image creation
if (!get_fs_usage("/", btotal, bused, &bsize)) {
snprintf(errMsg, sizeof(errMsg)-1, g_Locale->getText(LOCALE_FLASHUPDATE_READ_VOLUME_ERROR), "root0");
@@ -848,7 +848,7 @@ bool CFlashExpert::checkSize(int mtd, std::string &backupFile)
return true;
}
#ifdef BOXMODEL_CS_HD2
#ifdef BOXMODEL_CST_HD2
bool CFlashExpert::readDevtableFile(std::string &devtableFile, CMkfsJFFS2::v_devtable_t &v_devtable)
{
FILE *fd = fopen(devtableFile.c_str(), "r");
@@ -934,7 +934,7 @@ void CFlashExpert::readmtd(int preadmtd)
std::string tankStr = "";
#if ENABLE_EXTUPDATE
#ifdef BOXMODEL_CS_HD2
#ifdef BOXMODEL_CST_HD2
int eSize = CMTDInfo::getInstance()->getMTDEraseSize(CMTDInfo::getInstance()->findMTDsystem());
if (preadmtd == 0) {
if (createimage_other == 0) {
@@ -953,7 +953,7 @@ void CFlashExpert::readmtd(int preadmtd)
#endif
filename = (std::string)g_settings.update_dir + "/" + mtdInfo->getMTDName(preadmtd) + timeStr + tankStr + ".img";
#ifdef BOXMODEL_CS_HD2
#ifdef BOXMODEL_CST_HD2
std::string title = " (" + CMTDInfo::getInstance()->getMTDName(preadmtd) + ")";
std::string mountp = getJFFS2MountPoint(preadmtd);
if (preadmtd == 0) {
@@ -977,7 +977,7 @@ void CFlashExpert::readmtd(int preadmtd)
}
bool skipCheck = false;
#ifndef BOXMODEL_CS_HD2
#ifndef BOXMODEL_CST_HD2
if ((std::string)g_settings.update_dir == "/tmp")
skipCheck = true;
#else
@@ -1005,7 +1005,7 @@ void CFlashExpert::readmtd(int preadmtd)
sprintf(message, g_Locale->getText(LOCALE_FLASHUPDATE_SAVESUCCESS), filename.c_str());
sleep(1);
hide();
#ifdef BOXMODEL_CS_HD2
#ifdef BOXMODEL_CST_HD2
if (!forceOtherFilename)
ShowHint(LOCALE_MESSAGEBOX_INFO, message);
#else
@@ -1067,7 +1067,7 @@ int CFlashExpert::showMTDSelector(const std::string & actionkey)
for(int lx=0;lx<mtdInfo->getMTDCount();lx++) {
char sActionKey[20];
bool enabled = true;
#ifdef BOXMODEL_CS_HD2
#ifdef BOXMODEL_CST_HD2
// disable write uboot / uldr / env
if ((actionkey == "writemtd") && (lx == mtdInfo->findMTDNumberFromName("u-boot") ||
lx == mtdInfo->findMTDNumberFromName("uldr") ||
@@ -1091,7 +1091,7 @@ int CFlashExpert::showMTDSelector(const std::string & actionkey)
mtdselector->addItem(new CMenuForwarder(mtdInfo->getMTDName(lx).c_str(), enabled, NULL, this, sActionKey, CRCInput::convertDigitToKey(shortcut++)));
}
#if ENABLE_EXTUPDATE
#ifndef BOXMODEL_CS_HD2
#ifndef BOXMODEL_CST_HD2
if (actionkey == "writemtd")
mtdselector->addItem(new CMenuForwarder("systemFS with settings", true, NULL, this, "writemtd10", CRCInput::convertDigitToKey(shortcut++)));
#endif
@@ -1184,7 +1184,7 @@ int CFlashExpert::exec(CMenuTarget* parent, const std::string & actionKey)
return res;
}
#ifdef BOXMODEL_CS_HD2
#ifdef BOXMODEL_CST_HD2
CFlashExpertSetup::CFlashExpertSetup()
{
width = 40;
@@ -1350,4 +1350,4 @@ int CFlashExpertSetup::showMenu()
cfe->createimage_other = 0;
return res;
}
#endif // BOXMODEL_CS_HD2
#endif // BOXMODEL_CST_HD2