mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-14 17:03:40 +02:00
neutrino remove useless allow_flash from CmdParser()
Origin commit data
------------------
Commit: 6981a252c8
Author: vanhofen <vanhofen@gmx.de>
Date: 2024-01-05 (Fri, 05 Jan 2024)
Origin message was:
------------------
- neutrino remove useless allow_flash from CmdParser()
------------------
No further description and justification available within origin commit message!
This commit is contained in:
@@ -83,8 +83,6 @@ extern cVideo *videoDecoder;
|
|||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
extern int allow_flash;
|
|
||||||
|
|
||||||
//#define DRYRUN
|
//#define DRYRUN
|
||||||
|
|
||||||
#define gTmpPath "/tmp/"
|
#define gTmpPath "/tmp/"
|
||||||
@@ -302,7 +300,7 @@ bool CFlashUpdate::selectHttpImage(void)
|
|||||||
dprintf(DEBUG_NORMAL, "[update] url %s version %s (%d) timestamp %s (%ld) md5 %s name %s\n", url.c_str(), version.c_str(), newVer, versionInfo.getDate(), versionInfo.getDateTime(), md5.c_str(), name.c_str());
|
dprintf(DEBUG_NORMAL, "[update] url %s version %s (%d) timestamp %s (%ld) md5 %s name %s\n", url.c_str(), version.c_str(), newVer, versionInfo.getDate(), versionInfo.getDateTime(), md5.c_str(), name.c_str());
|
||||||
if (versionInfo.snapshot <= '2' && (newVer > curVer || versionInfo.getDateTime() > curInfo.getDateTime()))
|
if (versionInfo.snapshot <= '2' && (newVer > curVer || versionInfo.getDateTime() > curInfo.getDateTime()))
|
||||||
newfound = 1;
|
newfound = 1;
|
||||||
if (!allow_flash && (versionInfo.snapshot <= '2'))
|
if (versionInfo.snapshot <= '2')
|
||||||
enabled = false;
|
enabled = false;
|
||||||
fileTypes[i] = versionInfo.snapshot;
|
fileTypes[i] = versionInfo.snapshot;
|
||||||
std::string description = versionInfo.getType(true);
|
std::string description = versionInfo.getType(true);
|
||||||
@@ -444,13 +442,11 @@ bool CFlashUpdate::checkVersion4Update()
|
|||||||
CFileBrowser UpdatesBrowser;
|
CFileBrowser UpdatesBrowser;
|
||||||
CFileFilter UpdatesFilter;
|
CFileFilter UpdatesFilter;
|
||||||
|
|
||||||
if (allow_flash)
|
|
||||||
{
|
|
||||||
UpdatesFilter.addFilter(FILEBROWSER_UPDATE_FILTER);
|
UpdatesFilter.addFilter(FILEBROWSER_UPDATE_FILTER);
|
||||||
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
#if HAVE_ARM_HARDWARE || HAVE_MIPS_HARDWARE
|
||||||
UpdatesFilter.addFilter("zip");
|
UpdatesFilter.addFilter("zip");
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
std::string filters[] = {"bin", "txt"};
|
std::string filters[] = {"bin", "txt"};
|
||||||
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]);
|
||||||
@@ -496,8 +492,6 @@ bool CFlashUpdate::checkVersion4Update()
|
|||||||
fileType = 'Z';
|
fileType = 'Z';
|
||||||
else if (!strcmp(ptr, "zip"))
|
else if (!strcmp(ptr, "zip"))
|
||||||
fileType = 'Z';
|
fileType = 'Z';
|
||||||
else if (!allow_flash)
|
|
||||||
return false;
|
|
||||||
else
|
else
|
||||||
fileType = 0;
|
fileType = 0;
|
||||||
dprintf(DEBUG_NORMAL, "[update] manual file type: %s %c\n", ptr, fileType);
|
dprintf(DEBUG_NORMAL, "[update] manual file type: %s %c\n", ptr, fileType);
|
||||||
|
@@ -175,7 +175,6 @@ CTimeOSD *FileTimeOSD;
|
|||||||
#include "driver/lcd4l.h"
|
#include "driver/lcd4l.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int allow_flash = 1;
|
|
||||||
Zapit_config zapitCfg;
|
Zapit_config zapitCfg;
|
||||||
char zapit_lat[21]="#";
|
char zapit_lat[21]="#";
|
||||||
char zapit_long[21]="#";
|
char zapit_long[21]="#";
|
||||||
@@ -2554,11 +2553,7 @@ void CNeutrinoApp::CmdParser(int argc, char **argv)
|
|||||||
sections_debug = 1;
|
sections_debug = 1;
|
||||||
|
|
||||||
for(int x=1; x<argc; x++) {
|
for(int x=1; x<argc; x++) {
|
||||||
if ((!strcmp(argv[x], "-u")) || (!strcmp(argv[x], "--enable-update"))) {
|
if (((!strcmp(argv[x], "-v")) || (!strcmp(argv[x], "--verbose"))) && (x+1 < argc)) {
|
||||||
dprintf(DEBUG_NORMAL, "Software update enabled\n");
|
|
||||||
allow_flash = 1;
|
|
||||||
}
|
|
||||||
else if (((!strcmp(argv[x], "-v")) || (!strcmp(argv[x], "--verbose"))) && (x+1 < argc)) {
|
|
||||||
int dl = atoi(argv[x+ 1]);
|
int dl = atoi(argv[x+ 1]);
|
||||||
dprintf(DEBUG_NORMAL, "set debuglevel: %d\n", dl);
|
dprintf(DEBUG_NORMAL, "set debuglevel: %d\n", dl);
|
||||||
setDebugLevel(dl);
|
setDebugLevel(dl);
|
||||||
@@ -2596,8 +2591,7 @@ void CNeutrinoApp::CmdParser(int argc, char **argv)
|
|||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dprintf(DEBUG_NORMAL, "Usage: neutrino [-u | --enable-update] "
|
dprintf(DEBUG_NORMAL, "Usage: neutrino [-v | --verbose 0..3]\n");
|
||||||
"[-v | --verbose 0..3]\n");
|
|
||||||
exit(CNeutrinoApp::EXIT_ERROR);
|
exit(CNeutrinoApp::EXIT_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user