[cmdline] Rewrite "sync" command to use monojob_wait()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-11-01 01:56:33 +00:00
parent dc7a023715
commit 92c56e129b
5 changed files with 103 additions and 25 deletions

View File

@@ -24,7 +24,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <getopt.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <ipxe/pending.h>
#include <usr/sync.h>
/** @file
*
@@ -65,7 +65,7 @@ static int sync_exec ( int argc, char **argv ) {
return rc;
/* Wait for pending operations to complete */
if ( ( rc = pending_wait ( opts.timeout ) ) != 0 ) {
if ( ( rc = sync ( opts.timeout ) ) != 0 ) {
printf ( "Operations did not complete: %s\n", strerror ( rc ) );
return rc;
}