Re: [dev][ubase][PATCH] alternative - return exit codes like util-linux

From: sin <>
Date: Mon, 10 Feb 2014 10:10:11 +0000

On Sun, Feb 09, 2014 at 09:17:07PM -0500, Carlos Torres wrote:
> Hello,
> This patch is food for thought. i looked closer at what util-linux
> does (ugh) and found that their exit codes are what swapon/swapoff
> return. so this is an alternative patch that behaves the same way. I
> thought its possible there are shell scripts out there that are
> interested in the exit value of these...???

Hi Carlos,

From the manpage of swapon/swapoff.

" On success, zero is returned. On error, -1 is returned, and
errno is set appropriately."

So I don't see how or-ing the return values actually does anything.
It can only be -1 or 0.

Am I missing something here?
Received on Mon Feb 10 2014 - 11:10:11 CET

This archive was generated by hypermail 2.3.0 : Mon Feb 10 2014 - 11:12:15 CET