From: Theodore Ts'o Date: Fri, 8 Nov 2002 16:54:29 +0000 (-0500) Subject: fs_ext2.c (fs_expand, fs_shrink): Synchronize with EVMS CVS rev X-Git-Tag: E2FSPROGS-1_31~18 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2993bf7d3c67d367deb9df19317ee472e16242ba;p=tools%2Fe2fsprogs.git fs_ext2.c (fs_expand, fs_shrink): Synchronize with EVMS CVS rev 1.11 (2002/8/27). Read from the resize2fs output in non-blocking mode, so the GUI continues to updates the window. --- diff --git a/lib/evms/ChangeLog b/lib/evms/ChangeLog index 8cf2a4a..0a3bde8 100644 --- a/lib/evms/ChangeLog +++ b/lib/evms/ChangeLog @@ -1,5 +1,9 @@ 2002-11-08 Theodore Ts'o + * fs_ext2.c (fs_expand, fs_shrink): Synchronize with EVMS CVS rev + 1.11 (2002/8/27). Read from the resize2fs output in + non-blocking mode, so the GUI continues to updates the window. + * fsimext2.h: Synchronize with EVMS CVS rev 1.8 (2002/8/29). Change all __uXX's to u_intXX_t's. diff --git a/lib/evms/fs_ext2.c b/lib/evms/fs_ext2.c index 3a7b526..0b8f6ee 100644 --- a/lib/evms/fs_ext2.c +++ b/lib/evms/fs_ext2.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include "fsimext2.h" @@ -346,6 +347,7 @@ static int fs_expand( logical_volume_t * volume, close(fds2[1]); /* wait for child to complete */ + fcntl(fds2[0], F_SETFL, fcntl(fds2[0], F_GETFL,0) | O_NONBLOCK); while (!(pidf = waitpid( pidf, &status, WNOHANG ))) { bytes_read = read(fds2[0],buffer,MAX_USER_MESSAGE_LEN); if (bytes_read > 0) { @@ -499,6 +501,7 @@ static int fs_shrink( logical_volume_t * volume, close(fds2[1]); write(fds1[1], "Yes\n",4); + fcntl(fds2[0], F_SETFL, fcntl(fds2[0], F_GETFL,0) | O_NONBLOCK); /* wait for child to complete */ while (!(pidf = waitpid( pidf, &status, WNOHANG ))) { bytes_read = read(fds2[0],buffer,MAX_USER_MESSAGE_LEN);