diff --git a/resize/ChangeLog b/resize/ChangeLog
index a4eabff..a9b9803 100644
--- a/resize/ChangeLog
+++ b/resize/ChangeLog
@@ -1,3 +1,9 @@
+Tue Feb 24 15:22:52 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+	* Change the progress function to return an errcode_t; this allows
+		the progress function to return a error indicating a
+		user-requested cancel.
+
 1998-02-20  Theodore Y. Ts'o  <tytso@edt.mit.edu>
 
 	* main.c (check_mount, main): Resize2fs now checks the size of the
diff --git a/resize/main.c b/resize/main.c
index 7e25a8a..b251886 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -28,8 +28,8 @@
 	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 @@
 
 	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 @@
 		progress = 0;
 		rfs->prog_data = 0;
 	}
+	return 0;
 }
 
 static void check_mount(char *device_name)
diff --git a/resize/resize2fs.c b/resize/resize2fs.c
index 30b6c8d..993f534 100644
--- a/resize/resize2fs.c
+++ b/resize/resize2fs.c
@@ -63,7 +63,7 @@
  * This is the top-level routine which does the dirty deed....
  */
 errcode_t resize_fs(ext2_filsys fs, blk_t new_size, int flags,
-		    void (*progress)(ext2_resize_t rfs, int pass,
+		    errcode_t (*progress)(ext2_resize_t rfs, int pass,
 				     unsigned long cur,
 				     unsigned long max))
 {
@@ -327,9 +327,12 @@
 
 	adj = rfs->old_fs->group_desc_count;
 	max_group = fs->group_desc_count - adj;
-	if (rfs->progress)
-		rfs->progress(rfs, E2_RSZ_EXTEND_ITABLE_PASS,
-			      0, max_group);
+	if (rfs->progress) {
+		retval = rfs->progress(rfs, E2_RSZ_EXTEND_ITABLE_PASS,
+				       0, max_group);
+		if (retval)
+			goto errout;
+	}
 	for (i = rfs->old_fs->group_desc_count;
 	     i < fs->group_desc_count; i++) {
 		memset(&fs->group_desc[i], 0,
@@ -375,10 +378,12 @@
 		if (retval) goto errout;
 
 		io_channel_flush(fs->io);
-		if (rfs->progress)
-			rfs->progress(rfs, E2_RSZ_EXTEND_ITABLE_PASS,
-				      i - adj + 1, max_group);
-		
+		if (rfs->progress) {
+			retval = rfs->progress(rfs, E2_RSZ_EXTEND_ITABLE_PASS,
+					       i - adj + 1, max_group);
+			if (retval)
+				goto errout;
+		}
 		group_block += fs->super->s_blocks_per_group;
 	}
 	io_channel_flush(fs->io);
@@ -779,9 +784,12 @@
 	retval =  ext2fs_iterate_extent(rfs->bmap, 0, 0, 0);
 	if (retval) goto errout;
 
-	if (rfs->progress)
-		(rfs->progress)(rfs, E2_RSZ_BLOCK_RELOC_PASS, 0, to_move);
-
+	if (rfs->progress) {
+		retval = (rfs->progress)(rfs, E2_RSZ_BLOCK_RELOC_PASS,
+					 0, to_move);
+		if (retval)
+			goto errout;
+	}
 	while (1) {
 		retval = ext2fs_iterate_extent(rfs->bmap, &old_blk, &new_blk, &size);
 		if (retval) goto errout;
@@ -808,8 +816,11 @@
 			moved += c;
 			if (rfs->progress) {
 				io_channel_flush(fs->io);
-				(rfs->progress)(rfs, E2_RSZ_BLOCK_RELOC_PASS, 
+				retval = (rfs->progress)(rfs,
+						E2_RSZ_BLOCK_RELOC_PASS,
 						moved, to_move);
+				if (retval)
+					goto errout;
 			}
 		} while (size > 0);
 		io_channel_flush(fs->io);
@@ -880,6 +891,7 @@
 				   dgrp_t group, void * priv_data)
 {
 	ext2_resize_t rfs = (ext2_resize_t) priv_data;
+	errcode_t		retval;
 
 	/*
 	 * This check is to protect against old ext2 libraries.  It
@@ -890,8 +902,10 @@
 
 	if (rfs->progress) {
 		io_channel_flush(fs->io);
-		(rfs->progress)(rfs, E2_RSZ_INODE_SCAN_PASS,
-				group+1, fs->group_desc_count);
+		retval = (rfs->progress)(rfs, E2_RSZ_INODE_SCAN_PASS,
+					 group+1, fs->group_desc_count);
+		if (retval)
+			return retval;
 	}
 	
 	return 0;
@@ -925,10 +939,12 @@
 	start_to_move = (rfs->new_fs->group_desc_count *
 			 rfs->new_fs->super->s_inodes_per_group);
 	
-	if (rfs->progress)
-		(rfs->progress)(rfs, E2_RSZ_INODE_SCAN_PASS,
-				0, rfs->old_fs->group_desc_count);
-	
+	if (rfs->progress) {
+		retval = (rfs->progress)(rfs, E2_RSZ_INODE_SCAN_PASS,
+					 0, rfs->old_fs->group_desc_count);
+		if (retval)
+			goto errout;
+	}
 	ext2fs_set_inode_callback(scan, progress_callback, (void *) rfs);
 	pb.rfs = rfs;
 	pb.inode = &inode;
@@ -1027,6 +1043,7 @@
 
 struct istruct {
 	ext2_resize_t rfs;
+	errcode_t	err;
 	unsigned long	max;
 	int		num;
 };
@@ -1036,12 +1053,15 @@
 				   int	blocksize, char *buf, void *priv_data)
 {
 	struct istruct *is = (struct istruct *) priv_data;
-	ino_t	new_inode;
+	ino_t		new_inode;
 
 	if (is->rfs->progress && offset == 0) {
 		io_channel_flush(is->rfs->old_fs->io);
-		(is->rfs->progress)(is->rfs, E2_RSZ_INODE_REF_UPD_PASS,
-				++is->num, is->max);
+		is->err = (is->rfs->progress)(is->rfs,
+					      E2_RSZ_INODE_REF_UPD_PASS,
+					      ++is->num, is->max);
+		if (is->err)
+			return DIRENT_ABORT;
 	}
 
 	if (!dirent->inode)
@@ -1078,15 +1098,26 @@
 	is.num = 0;
 	is.max = ext2fs_dblist_count(rfs->old_fs->dblist);
 	is.rfs = rfs;
+	is.err = 0;
 
-	if (rfs->progress)
-		(rfs->progress)(rfs, E2_RSZ_INODE_REF_UPD_PASS,
-				0, is.max);
+	if (rfs->progress) {
+		retval = (rfs->progress)(rfs, E2_RSZ_INODE_REF_UPD_PASS,
+					 0, is.max);
+		if (retval)
+			goto errout;
+	}
 	
 	retval = ext2fs_dblist_dir_iterate(rfs->old_fs->dblist,
 					   DIRENT_FLAG_INCLUDE_EMPTY, 0,
 					   check_and_change_inodes, &is);
+	if (retval)
+		goto errout;
+	if (is.err) {
+		retval = is.err;
+		goto errout;
+	}
 
+errout:
 	ext2fs_free_extent_table(rfs->imap);
 	rfs->imap = 0;
 	return retval;
@@ -1145,8 +1176,12 @@
 	if (to_move == 0)
 		return 0;
 
-	if (rfs->progress)
-		rfs->progress(rfs, E2_RSZ_MOVE_ITABLE_PASS, 0, to_move);
+	if (rfs->progress) {
+		retval = rfs->progress(rfs, E2_RSZ_MOVE_ITABLE_PASS,
+				       0, to_move);
+		if (retval)
+			goto errout;
+	}
 
 	rfs->old_fs->flags |= EXT2_FLAG_MASTER_SB_ONLY;
 
@@ -1209,8 +1244,10 @@
 		ext2fs_mark_super_dirty(rfs->old_fs);
 		if (rfs->progress) {
 			ext2fs_flush(rfs->old_fs);
-			rfs->progress(rfs, E2_RSZ_MOVE_ITABLE_PASS,
-				      ++moved, to_move);
+			retval = rfs->progress(rfs, E2_RSZ_MOVE_ITABLE_PASS,
+					       ++moved, to_move);
+			if (retval)
+				goto errout;
 		}
 	}
 	ext2fs_flush(fs);
diff --git a/resize/resize2fs.h b/resize/resize2fs.h
index 5d96353..cc89f4f 100644
--- a/resize/resize2fs.h
+++ b/resize/resize2fs.h
@@ -81,7 +81,7 @@
 	/*
 	 * For the progress meter
 	 */
-	void		(*progress)(ext2_resize_t rfs, int pass,
+	errcode_t	(*progress)(ext2_resize_t rfs, int pass,
 				    unsigned long cur,
 				    unsigned long max);
 	void		*prog_data;
@@ -99,8 +99,8 @@
 
 /* prototypes */
 extern errcode_t resize_fs(ext2_filsys fs, blk_t new_size, int flags,
-			   void	(*progress)(ext2_resize_t rfs, int pass,
-					    unsigned long cur,
+			   errcode_t	(*progress)(ext2_resize_t rfs,
+					    int pass, unsigned long cur,
 					    unsigned long max));
 
 /* extent.c */
