From 7db84a61c6fd918652742ab79d3163b5b5d866ac Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Thu, 16 Feb 2006 11:41:10 +0000 Subject: [PATCH] sync after swapon/swapoff (see also #330327) * src/Win_GParted.cc: sync after swapon/swapoff (see also #330327) --- ChangeLog | 4 ++++ src/Win_GParted.cc | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 635b23be..dd0c4d2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-02-16 Bart Hakvoort + + * src/Win_GParted.cc: sync after swapon/swapoff (see also #330327) + 2006-02-16 Bart Hakvoort * configure.in: improved check for libparted (thanks to Pete Shinners, diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index 8e0b01fc..71e47b5c 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -1384,9 +1384,9 @@ void Win_GParted::activate_unmount() void Win_GParted::thread_toggle_swap( bool * succes, Glib::ustring * error ) { if ( selected_partition .busy ) - *succes = ! Utils::execute_command( "swapoff -v " + selected_partition .partition, str_temp, *error ) ; + *succes = ! Utils::execute_command( "swapoff -v " + selected_partition .partition + " && sync", str_temp, *error ) ; else - *succes = ! Utils::execute_command( "swapon -v " + selected_partition .partition, str_temp, *error ) ; + *succes = ! Utils::execute_command( "swapon -v " + selected_partition .partition + " && sync", str_temp, *error ) ; pulse = false ; }