From: Sami Kerola <kerolasa@iki.fi>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 5/6] rename: continue despite something failed
Date: Sat, 28 Jun 2014 19:29:52 +0100 [thread overview]
Message-ID: <CAG27Bk39i4Jv7fKoTSNVWi=-Q=gATg_m+F9H3v_BNM9SX4srQA@mail.gmail.com> (raw)
In-Reply-To: <20140625121153.GC30418@x2.net.home>
On 25 June 2014 13:11, Karel Zak <kzak@redhat.com> 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/
next prev parent reply other threads:[~2014-06-28 18:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-22 10:31 [PATCH 0/6] pull: rename fixes Sami Kerola
2014-06-22 10:31 ` [PATCH 1/6] rename: allow renaming in subdirectories Sami Kerola
2014-06-22 10:31 ` [PATCH 2/6] tests: add function to change directory reliable way Sami Kerola
2014-06-22 10:31 ` [PATCH 3/6] tests: use ts_cd everywhere to change direcrory Sami Kerola
2014-06-22 10:31 ` [PATCH 4/6] tests: add rename(1) checks Sami Kerola
2014-06-22 10:31 ` [PATCH 5/6] rename: continue despite something failed Sami Kerola
2014-06-25 12:11 ` Karel Zak
2014-06-28 18:29 ` Sami Kerola [this message]
2014-06-22 10:31 ` [PATCH 6/6] rename: use function pointer to select file or symlink operation Sami Kerola
2014-06-25 12:05 ` [PATCH 0/6] pull: rename fixes Karel Zak
2014-07-22 10:13 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAG27Bk39i4Jv7fKoTSNVWi=-Q=gATg_m+F9H3v_BNM9SX4srQA@mail.gmail.com' \
--to=kerolasa@iki.fi \
--cc=kerolasa@gmail.com \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.