#include <time.h>
static char spaces[80], backspaces[80];
+static time_t last_update;
static int int_log10(unsigned int arg)
{
spaces[sizeof(spaces)-1] = 0;
memset(backspaces, '\b', sizeof(backspaces)-1);
backspaces[sizeof(backspaces)-1] = 0;
- progress->skip_progress = 0;
+
+ memset(progress, 0, sizeof(*progress));
if (getenv("E2FSPROGS_SKIP_PROGRESS"))
progress->skip_progress++;
- memset(progress, 0, sizeof(*progress));
/*
* Figure out how many digits we need
fputs(label, stdout);
fflush(stdout);
}
+ last_update = 0;
}
void ext2fs_numeric_progress_update(ext2_filsys fs,
struct ext2fs_numeric_progress_struct * progress,
__u64 val)
{
- static time_t now, last_update = 0;
+ time_t now;
if (!(fs->flags & EXT2_FLAG_PRINT_PROGRESS))
return;
char *bad_blocks_filename;
__u32 fs_stride;
int quotatype = -1; /* Initialize both user and group quotas by default */
-int no_progress;
struct ext2_super_block fs_param;
char *fs_uuid = NULL;
fs->group_desc_count);
for (i = 0; i < fs->group_desc_count; i++) {
- if (!no_progress)
- ext2fs_numeric_progress_update(fs, &progress, i);
+ ext2fs_numeric_progress_update(fs, &progress, i);
blk = ext2fs_inode_table_loc(fs, i);
num = fs->inode_blocks_per_group;
}
blk += c;
count -= c;
- if (!no_progress)
- ext2fs_numeric_progress_update(fs, &progress, blk);
+ ext2fs_numeric_progress_update(fs, &progress, blk);
}
ext2fs_zero_blocks2(0, 0, 0, 0, 0);
blocksize, sys_page_size);
}
- profile_get_boolean(profile, "options", "no_progress", 0, 0,
- &no_progress);
lazy_itable_init = 0;
if (access("/sys/fs/ext4/features/lazy_itable_init", R_OK) == 0)
lazy_itable_init = 1;
_("Discarding device blocks: "),
blocks);
while (cur < blocks) {
- if (!no_progress)
- ext2fs_numeric_progress_update(fs, &progress, cur);
+ ext2fs_numeric_progress_update(fs, &progress, cur);
if (cur + count > blocks)
count = blocks - cur;