mirror of https://github.com/vitalif/e2fsprogs
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.bitmap-optimize
parent
758ab678d8
commit
2993bf7d3c
|
@ -1,5 +1,9 @@
|
|||
2002-11-08 Theodore Ts'o <tytso@mit.edu>
|
||||
|
||||
* 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.
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <plugin.h>
|
||||
#include <sys/wait.h>
|
||||
#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);
|
||||
|
|
Loading…
Reference in New Issue