From 3b627e8d6735fd81906117d580ee70292b2cfaaf Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 24 Feb 1998 20:24:49 +0000 Subject: ChangeLog, main.c, resize2fs.c, resize2fs.h: Change the progress function to return an errcode_t; this allows the progress function to return a error indicating a user-requested cancel. --- resize/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'resize/main.c') diff --git a/resize/main.c b/resize/main.c index 7e25a8a5..b2518869 100644 --- a/resize/main.c +++ b/resize/main.c @@ -28,8 +28,8 @@ static volatile void usage (char *prog) exit (1); } -static void resize_progress_func(ext2_resize_t rfs, int pass, - unsigned long cur, unsigned long max) +static errcode_t resize_progress_func(ext2_resize_t rfs, int pass, + unsigned long cur, unsigned long max) { ext2_sim_progmeter progress; const char *label; @@ -37,7 +37,7 @@ static void resize_progress_func(ext2_resize_t rfs, int pass, progress = (ext2_sim_progmeter) rfs->prog_data; if (max == 0) - return; + return 0; if (cur == 0) { if (progress) ext2fs_progress_close(progress); @@ -77,6 +77,7 @@ static void resize_progress_func(ext2_resize_t rfs, int pass, progress = 0; rfs->prog_data = 0; } + return 0; } static void check_mount(char *device_name) -- cgit v1.2.3