Re: [dev][ubase][PATCH] swapon/swapoff -a and -p

2014-02-09 Thread sin
On Sat, Feb 08, 2014 at 10:34:31PM -0500, Carlos Torres wrote:
 Hi sin,
 attached are two patches for the -a flag on swapon and swapoff.  there
 is room for improvement. and cleaning up, but i wasn't sure how you
 might want it organized.   i altered the error handling a little bit,
 since it felt funny how you let the loop continue on error and
 possibly removing the EXIT_FAILURE return code if two devices are to
 be swapped on/off and the first failed but the second succeeds.  I
 make it so that once EXIT_FAILURE is set it doesn't go away.

Thanks a lot for your patches.  They have been applied.

(You are right btw about setting the exit value.)

Cheers,
sin



[dev][ubase][PATCH] swapon/swapoff -a and -p

2014-02-08 Thread Carlos Torres
Hi sin,
attached are two patches for the -a flag on swapon and swapoff.  there
is room for improvement. and cleaning up, but i wasn't sure how you
might want it organized.   i altered the error handling a little bit,
since it felt funny how you let the loop continue on error and
possibly removing the EXIT_FAILURE return code if two devices are to
be swapped on/off and the first failed but the second succeeds.  I
make it so that once EXIT_FAILURE is set it doesn't go away.

i don't update TODO.

--Carlos


0001-disable-all-swap-devices.patch
Description: Binary data


0001-add-a-flag-to-enable-all-swap-devices-unless-noauto-.patch
Description: Binary data


0002-prefer-swap-device-option.patch
Description: Binary data