bximage_new: improvements for non-interactive (quiet) mode
- all operations now also working with one file name parameter - suppress BX_INFO output in quiet mode
This commit is contained in:
parent
4802fac2de
commit
0236e5f591
@ -65,11 +65,13 @@ enum {
|
||||
#endif
|
||||
|
||||
#define BX_DEBUG(x)
|
||||
#define BX_INFO(x) { (printf) x ; printf("\n"); }
|
||||
#define BX_INFO(x) { if (bx_interactive) { (printf) x ; printf("\n"); } }
|
||||
#define BX_ERROR(x) { (printf) x ; printf("\n"); }
|
||||
#define BX_PANIC(x) { (printf) x ; printf("\n"); myexit(1); }
|
||||
#define BX_ASSERT(x)
|
||||
|
||||
extern int bx_interactive;
|
||||
|
||||
class device_image_t;
|
||||
|
||||
void myexit(int code);
|
||||
|
@ -875,13 +875,12 @@ int parse_cmdline(int argc, char *argv[])
|
||||
bx_interactive = 1;
|
||||
} else {
|
||||
set_default_values();
|
||||
if (bximage_mode == BXIMAGE_MODE_CREATE_IMAGE) {
|
||||
if (fnargs < 1) {
|
||||
bx_interactive = 1;
|
||||
}
|
||||
} else if (fnargs < 2) {
|
||||
if (fnargs < 1) {
|
||||
bx_interactive = 1;
|
||||
}
|
||||
if ((bximage_mode == BXIMAGE_MODE_COMMIT_UNDOABLE) && (fnargs == 1)) {
|
||||
snprintf(bx_filename_2, 256, "%s%s", bx_filename_1, UNDOABLE_REDOLOG_EXTENSION);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user