mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
Merge branch 'check/next-cc'
Compiles on most platforms, starts. Not really tested. Conflicts: acinclude.m4 lib/libdvbsub/Makefile.am lib/libtriple/Makefile.am lib/libtuxtxt/Makefile.am src/Makefile.am src/create_rcsim_h.sh src/daemonc/Makefile.am src/driver/Makefile.am src/driver/audiodec/Makefile.am src/driver/pictureviewer/Makefile.am src/eitd/Makefile.am src/gui/Makefile.am src/gui/bouquetlist.cpp src/gui/channellist.cpp src/gui/scan_setup.cpp src/gui/streaminfo2.cpp src/gui/streaminfo2.h src/gui/update.cpp src/gui/widget/Makefile.am src/gui/widget/listbox.cpp src/neutrino.cpp src/nhttpd/tuxboxapi/coolstream/Makefile.am src/rcsim.c src/system/Makefile.am src/zapit/src/Makefile.am src/zapit/src/frontend.cpp src/zapit/src/zapit.cpp
This commit is contained in:
@@ -164,7 +164,8 @@ bool CFlashTool::program( const std::string & filename, int globalProgressEndEra
|
||||
ssize_t filesize;
|
||||
int globalProgressBegin = 0;
|
||||
|
||||
CNeutrinoApp::getInstance()->saveEpg(false);
|
||||
if(g_settings.epg_save)
|
||||
CNeutrinoApp::getInstance()->saveEpg(false);
|
||||
|
||||
if(statusViewer)
|
||||
statusViewer->showLocalStatus(0);
|
||||
@@ -183,12 +184,13 @@ bool CFlashTool::program( const std::string & filename, int globalProgressEndEra
|
||||
bool skipCopy = false;
|
||||
#ifdef BOXMODEL_APOLLO
|
||||
if (strcmp(dn, "/tmp") != 0) {
|
||||
long btotal = 0, bused = 0, bsize = 0;
|
||||
uint64_t btotal = 0, bused = 0;
|
||||
long bsize = 0;
|
||||
if (get_fs_usage("/tmp", btotal, bused, &bsize)) {
|
||||
int fileSize = file_size(filename.c_str()) / 1024;
|
||||
int backupMaxSize = (int)((btotal - bused) * bsize);
|
||||
int res = 10; // Reserved 10% of available space
|
||||
backupMaxSize = (backupMaxSize - ((backupMaxSize * res) / 100)) / 1024;
|
||||
uint64_t fileSize = (uint64_t)file_size(filename.c_str()) / 1024ULL;
|
||||
uint64_t backupMaxSize = (int)((btotal - bused) * bsize);
|
||||
uint64_t res = 10; // Reserved 10% of available space
|
||||
backupMaxSize = (backupMaxSize - ((backupMaxSize * res) / 100ULL)) / 1024ULL;
|
||||
if (backupMaxSize < fileSize)
|
||||
skipCopy = true;
|
||||
}
|
||||
@@ -224,7 +226,7 @@ bool CFlashTool::program( const std::string & filename, int globalProgressEndEra
|
||||
return false;
|
||||
}
|
||||
|
||||
filesize = lseek( fd1, 0, SEEK_END);
|
||||
filesize = (ssize_t)lseek( fd1, 0, SEEK_END);
|
||||
lseek( fd1, 0, SEEK_SET);
|
||||
|
||||
if(filesize==0) {
|
||||
@@ -429,7 +431,7 @@ bool CFlashTool::check_md5( const std::string & filename, const std::string & sm
|
||||
//printf("[flashtool] check file %s md5 %s\n", filename.c_str(), ptr);
|
||||
|
||||
for(int i = 0; i < 16; i++)
|
||||
omd5[i] = FROMHEX(ptr[i*2])*16 + FROMHEX(ptr[i*2+1]);
|
||||
omd5[i] = (unsigned char)(FROMHEX(ptr[i*2])*16 + FROMHEX(ptr[i*2+1]));
|
||||
|
||||
md5_file(filename.c_str(), 1, md5);
|
||||
if(memcmp(md5, omd5, 16))
|
||||
@@ -641,6 +643,15 @@ int CMTDInfo::findMTDNumber(const std::string & filename)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int CMTDInfo::findMTDNumberFromName(const char* name)
|
||||
{
|
||||
for (int i = 0; i < getMTDCount(); i++) {
|
||||
if ((std::string)name == getMTDName(i))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::string CMTDInfo::getMTDName(const std::string & filename)
|
||||
{
|
||||
return getMTDName( findMTDNumber(filename) );
|
||||
|
Reference in New Issue
Block a user