chg, textual

This commit is contained in:
iceman1001 2020-06-02 11:54:42 +02:00
commit c6072d7a45

View file

@ -88,7 +88,7 @@ int preferences_load(void) {
// to better control json cant find file error msg. // to better control json cant find file error msg.
char *fn = prefGetFilename(); char *fn = prefGetFilename();
if (fileExists(fn)) { if (fileExists(fn)) {
PrintAndLogEx(INFO, "Loading Preferences..."); PrintAndLogEx(INFO, "Loading preferences...");
if (loadFileJSON(fn, &dummyData, sizeof(dummyData), &dummyDL, &preferences_load_callback) == PM3_SUCCESS) { if (loadFileJSON(fn, &dummyData, sizeof(dummyData), &dummyDL, &preferences_load_callback) == PM3_SUCCESS) {
session.preferences_loaded = true; session.preferences_loaded = true;
} }
@ -104,7 +104,7 @@ int preferences_load(void) {
int preferences_save(void) { int preferences_save(void) {
// Note sure if backup has value ? // Note sure if backup has value ?
PrintAndLogEx(INFO, "Saving Preferences..."); PrintAndLogEx(INFO, "Saving preferences...");
char *fn = prefGetFilename(); char *fn = prefGetFilename();
int fnLen = strlen(fn) + 5; // .bak\0 int fnLen = strlen(fn) + 5; // .bak\0
@ -908,18 +908,16 @@ static int CmdPrefSet(const char *Cmd) {
static int CmdPrefShow(const char *Cmd) { static int CmdPrefShow(const char *Cmd) {
if (session.preferences_loaded) {
char *fn = prefGetFilename(); char *fn = prefGetFilename();
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
PrintAndLogEx(NORMAL, _CYAN_("Preferences loaded from %s"), fn); PrintAndLogEx(INFO, _CYAN_("Preferences loaded from " _YELLOW_("%s")), fn);
free(fn); free(fn);
} else {
if (!session.preferences_loaded) {
PrintAndLogEx(ERR, "Preferences not loaded"); PrintAndLogEx(ERR, "Preferences not loaded");
return PM3_ESOFT; return PM3_ESOFT;
} }
// PrintAndLogEx(NORMAL, " preference file........ "_GREEN_("%s"), fn);
showEmojiState(prefShowNone); showEmojiState(prefShowNone);
showHintsState(prefShowNone); showHintsState(prefShowNone);
showColorState(prefShowNone); showColorState(prefShowNone);
@ -931,7 +929,6 @@ static int CmdPrefShow(const char *Cmd) {
showClientDebugState(prefShowNone); showClientDebugState(prefShowNone);
// showDeviceDebugState(prefShowNone); // showDeviceDebugState(prefShowNone);
PrintAndLogEx(NORMAL, "");
return PM3_SUCCESS; return PM3_SUCCESS;
} }
/* /*