diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2010-12-10 01:26:08 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2010-12-10 01:26:08 -0500 |
commit | f8ff3e5854b6bd4b61061b6d521619e076623183 (patch) | |
tree | 234e556de09a7f967adb5474f19919d93eb24b3a /src/nukectl.c | |
parent | 659a5bde39aaf66c564d74f26764d9cad14744da (diff) | |
download | NetNuke2-f8ff3e5854b6bd4b61061b6d521619e076623183.tar.gz |
Dual window testing (sad attempt so far)
A new variable will need to be introduced to track how many devices there are, so that we know how many rows to increment while printing
Diffstat (limited to 'src/nukectl.c')
-rw-r--r-- | src/nukectl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nukectl.c b/src/nukectl.c index 3ee3bc5..de6b28d 100644 --- a/src/nukectl.c +++ b/src/nukectl.c @@ -59,6 +59,8 @@ void ignore_device(char** list, nndevice_t** d) void* wipe(void* device) { + extern WINDOW* main_window, *info_window; + extern pthread_mutex_t main_window_lock; nndevice_t* d = (nndevice_t*)device; unsigned long long times = 0; unsigned long long block = 0; @@ -91,7 +93,9 @@ void* wipe(void* device) if(verbose_flag) { percent = (long double)((bytes_out / (long double)d->sz) * 100); - printf("%s: %llu of %llu (%0.2Lf%%)\n", d->path, bytes_out, d->sz, percent); + //COM(self, "%s: %llu of %llu (%0.2Lf%%)\n", d->path, bytes_out, d->sz, percent); + mvwprintw(info_window, 0, 0, "%s: %llu of %llu (%0.2Lf%%)\n", d->path, bytes_out, d->sz, percent); + wrefresh(info_window); } bytes_out += nnwrite(fd, d->blksz); block++; |