* Initial working version of the flash gui - Renamed to goxf - Needs 'sudo' to be enabled to the user without password - Identify and ban piece files while including them in the list - Support for flashing multiple piece files - progressbar and warn/error messages handled - Supports reboot mobo command
* Make qmode be functional * Lot of hardcore fixups on squeue_open - Should work now everywhere fine asumid UID 1000 as allowed user - Reduce timeouts - Add push2 method
This commit is contained in:
1 parent
2ddb2923c6
commit
83c25d7eb2
13 files changed
+375
-114
No files matched your search
+21
-9
@@ -42,16 +42,28 @@ void progressbar(unsigned long long part, unsigned long long total)
|
||||
int pc;
|
||||
int tmp, cols = 80;
|
||||
|
||||
/* percentage calculation */
|
||||
pc = (int)(part*100/total);
|
||||
(pc<0)?pc=0:(pc>100)?pc=100:0;
|
||||
printf("\e[K %3d%% [", pc);
|
||||
if (columns)
|
||||
cols = atoi(columns);
|
||||
cols-=15;
|
||||
for(tmp=cols*pc/100;tmp;tmp--) printf("#");
|
||||
for(tmp=cols-(cols*pc/100);tmp;tmp--) printf("-");
|
||||
printf("]\r");
|
||||
fflush(stdout);
|
||||
(pc<0)?pc=0:(pc>100)?pc=100:0;
|
||||
|
||||
#if HAVE_SQUEUE
|
||||
if (qmode) {
|
||||
char msg[128];
|
||||
sprintf(msg, "%d%%", pc);
|
||||
squeue_push2(p, "bar", msg, 0);
|
||||
} else {
|
||||
#endif
|
||||
printf("\e[K %3d%% [", pc);
|
||||
if (columns)
|
||||
cols = atoi(columns);
|
||||
cols-=15;
|
||||
for(tmp=cols*pc/100;tmp;tmp--) printf("#");
|
||||
for(tmp=cols-(cols*pc/100);tmp;tmp--) printf("-");
|
||||
printf("]\r");
|
||||
fflush(stdout);
|
||||
#if HAVE_SQUEUE
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void eprintf(const char *format, ...)
|
||||
|
||||
Reference in new issue
Block a user