Re: [PATCH 5/6] rename: continue despite something failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25 June 2014 13:11, Karel Zak <kzak@xxxxxxxxxx> wrote:
> On Sun, Jun 22, 2014 at 11:31:56AM +0100, Sami Kerola wrote:
>> Try to do all file operations even when one or some of them fail.
>
>  It would be nice to have a special return code for situation when
>  something failed. See for example "mount -a" of kill(1) where we have
>
>     #define KILL_EXIT_SOMEOK      64
>
>  and add to man page:
>
>        0      success
>        1      failure
>        64     partial success

Hi Karel,

Good idea, and I extended it a little. I added four different exit values,
that are hopefully useful.

  0    all requested rename operations were successful
  1    all rename operations failed
  2    some rename operations failed
  4    nothing was renamed
  64   unanticipated error occurred

The changes can be found from my git repository below, and I will
submit the patches 0005 and 0006 again to email list. There is also
new change, 0007, that is a check the exit values are working as
expected.

--- snip
The following changes since commit 575718a04aa0c053875041dc387e360f2dcaa70d:
  fallocate: use O_CREAT only for the default behavior (2014-06-26
14:45:02 +0200)
are available in the git repository at:
  git://github.com/kerolasa/lelux-utiliteetit.git
for you to fetch changes up to 40cbaab8022ba9e0dfeb3358655c0631bd1143bc:
  tests: add rename(1) return value check (2014-06-28 19:11:30 +0100)
-- snip

-- 
Sami Kerola
http://www.iki.fi/kerolasa/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux