mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Conflicts:
configure.ac
data/fonts/Makefile.am
src/gui/cam_menu.cpp
src/gui/update.cpp
src/zapit/src/capmt.cpp
Origin commit data
------------------
Commit: 5db35f49c0
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-02-12 (Sun, 12 Feb 2017)
This commit is contained in:
@@ -93,7 +93,7 @@ extern int allow_flash;
|
||||
#define FILEBROWSER_UPDATE_FILTER "img"
|
||||
|
||||
#define MTD_OF_WHOLE_IMAGE 0
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
#define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd0"
|
||||
#else
|
||||
#define MTD_DEVICE_OF_UPDATE_PART "/dev/mtd3"
|
||||
@@ -353,7 +353,7 @@ bool CFlashUpdate::selectHttpImage(void)
|
||||
newVersion = versions[selected];
|
||||
file_md5 = md5s[selected];
|
||||
fileType = fileTypes[selected];
|
||||
//NI #ifdef BOXMODEL_APOLLO
|
||||
//NI #ifdef BOXMODEL_CS_HD2
|
||||
#if 0
|
||||
if(fileType < '3') {
|
||||
int esize = CMTDInfo::getInstance()->getMTDEraseSize(sysfs);
|
||||
@@ -596,7 +596,7 @@ int CFlashUpdate::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
#endif
|
||||
if(fileType < '3') {
|
||||
//flash it...
|
||||
#ifndef BOXMODEL_APOLLO
|
||||
#ifndef BOXMODEL_CS_HD2
|
||||
if (g_settings.apply_settings) {
|
||||
if (ShowMsg(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_FLASHUPDATE_APPLY_SETTINGS), CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_UPDATE) == CMsgBox::mbrYes)
|
||||
if (!CExtUpdate::getInstance()->applySettings(filename, CExtUpdate::MODE_SOFTUPDATE)) {
|
||||
@@ -664,7 +664,7 @@ CFlashExpert::CFlashExpert()
|
||||
{
|
||||
selectedMTD = -1;
|
||||
width = 40;
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
forceOtherFilename = false;
|
||||
otherFilename = "";
|
||||
createimage_other = 0;
|
||||
@@ -681,7 +681,7 @@ CFlashExpert* CFlashExpert::getInstance()
|
||||
|
||||
bool CFlashExpert::checkSize(int mtd, std::string &backupFile)
|
||||
{
|
||||
#ifndef BOXMODEL_APOLLO
|
||||
#ifndef BOXMODEL_CS_HD2
|
||||
if (mtd < 0) return false;
|
||||
#endif
|
||||
char errMsg[1024] = {0};
|
||||
@@ -695,7 +695,7 @@ bool CFlashExpert::checkSize(int mtd, std::string &backupFile)
|
||||
uint64_t btotal = 0, bused = 0;
|
||||
long bsize = 0;
|
||||
uint64_t backupRequiredSize = 0;
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_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");
|
||||
@@ -731,7 +731,7 @@ bool CFlashExpert::checkSize(int mtd, std::string &backupFile)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
bool CFlashExpert::readDevtableFile(std::string &devtableFile, CMkfsJFFS2::v_devtable_t &v_devtable)
|
||||
{
|
||||
FILE *fd = fopen(devtableFile.c_str(), "r");
|
||||
@@ -815,7 +815,7 @@ void CFlashExpert::readmtd(int preadmtd)
|
||||
netGetHostname(hostName);
|
||||
std::string timeStr = getNowTimeStr("_%Y%m%d_%H%M");
|
||||
std::string tankStr = "";
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
int eSize = CMTDInfo::getInstance()->getMTDEraseSize(CMTDInfo::getInstance()->findMTDsystem());
|
||||
if (preadmtd == 0) {
|
||||
if (createimage_other == 0) {
|
||||
@@ -833,7 +833,7 @@ void CFlashExpert::readmtd(int preadmtd)
|
||||
else
|
||||
filename = (std::string)g_settings.update_dir + "/" + mtdInfo->getMTDName(preadmtd) + timeStr + tankStr + ".img";
|
||||
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
std::string title = " (" + CMTDInfo::getInstance()->getMTDName(preadmtd) + ")";
|
||||
std::string mountp = getJFFS2MountPoint(preadmtd);
|
||||
if (preadmtd == 0) {
|
||||
@@ -857,7 +857,7 @@ void CFlashExpert::readmtd(int preadmtd)
|
||||
}
|
||||
|
||||
bool skipCheck = false;
|
||||
#ifndef BOXMODEL_APOLLO
|
||||
#ifndef BOXMODEL_CS_HD2
|
||||
if ((std::string)g_settings.update_dir == "/tmp")
|
||||
skipCheck = true;
|
||||
#else
|
||||
@@ -885,7 +885,7 @@ void CFlashExpert::readmtd(int preadmtd)
|
||||
sprintf(message, g_Locale->getText(LOCALE_FLASHUPDATE_SAVESUCCESS), filename.c_str());
|
||||
sleep(1);
|
||||
hide();
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
if (!forceOtherFilename)
|
||||
ShowHint(LOCALE_MESSAGEBOX_INFO, message);
|
||||
#else
|
||||
@@ -947,7 +947,7 @@ int CFlashExpert::showMTDSelector(const std::string & actionkey)
|
||||
for(int lx=0;lx<mtdInfo->getMTDCount();lx++) {
|
||||
char sActionKey[20];
|
||||
bool enabled = true;
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
// disable write uboot / uldr / env
|
||||
if ((actionkey == "writemtd") && (lx == mtdInfo->findMTDNumberFromName("u-boot") ||
|
||||
lx == mtdInfo->findMTDNumberFromName("uldr") ||
|
||||
@@ -970,7 +970,7 @@ int CFlashExpert::showMTDSelector(const std::string & actionkey)
|
||||
sprintf(sActionKey, "%s%d", actionkey.c_str(), lx);
|
||||
mtdselector->addItem(new CMenuForwarder(mtdInfo->getMTDName(lx).c_str(), enabled, NULL, this, sActionKey, CRCInput::convertDigitToKey(shortcut++)));
|
||||
}
|
||||
#ifndef BOXMODEL_APOLLO
|
||||
#ifndef BOXMODEL_CS_HD2
|
||||
if (actionkey == "writemtd")
|
||||
mtdselector->addItem(new CMenuForwarder("systemFS with settings", true, NULL, this, "writemtd10", CRCInput::convertDigitToKey(shortcut++)));
|
||||
#endif
|
||||
@@ -1059,7 +1059,7 @@ int CFlashExpert::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
#ifdef BOXMODEL_CS_HD2
|
||||
CFlashExpertSetup::CFlashExpertSetup()
|
||||
{
|
||||
width = 40;
|
||||
@@ -1227,4 +1227,4 @@ g_settings.flashupdate_createimage_add_spare = 0;
|
||||
cfe->createimage_other = 0;
|
||||
return res;
|
||||
}
|
||||
#endif // BOXMODEL_APOLLO
|
||||
#endif // BOXMODEL_CS_HD2
|
||||
|
Reference in New Issue
Block a user