All of lore.kernel.org
 help / color / mirror / Atom feed
From: "K. Richard Pixley" <rich@noir.com>
To: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: btrfsctl returns bad exit status
Date: Fri, 23 Jul 2010 13:04:40 -0700	[thread overview]
Message-ID: <4C49F5D8.50803@noir.com> (raw)
In-Reply-To: <4C47513D.1070902@noir.com>

Using btrfsctl from ubuntu maverick, (built and running on 
ubuntu-10.04), I get:

rich@eisenhower> btrfsctl -s snap1 /home || echo failed
operation complete
Btrfs Btrfs v0.19
failed
rich@eisenhower> ls -las snap1
total 4
4 drwxr-xr-x 1 root    root    32 2010-07-20 18:25 .
0 drwxr-xr-x 1 rich    rich  1324 2010-07-21 12:47 ..
0 drwxr-xr-x 1 checker build   22 2010-07-20 18:21 checker
0 drwxr-xr-x 1 rich    rich  1322 2010-07-21 12:44 rich
0 drwxr-xr-x 1 root    root    36 2010-07-21 10:47 za-cb

This would seem to indicate a non-zero exit status despite the fact that 
the snapshotting operation appears to have succeeded.  This makes it 
impossible to programmatically check whether a snapshot was created 
successfully or not as I will need to explicitly discard the exit status 
from btrfsctl.

I get the same results when built from git, except that it identifies 
itself as "v0.19-16-g075587c".

I would expect that btrfsctl would return zero exit status when it was 
capable of doing what it was asked and non-zero exit status only when it 
could not.

--rich

       reply	other threads:[~2010-07-23 20:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4C47513D.1070902@noir.com>
2010-07-23 20:04 ` K. Richard Pixley [this message]
2010-07-23 20:06   ` btrfsctl returns bad exit status C Anthony Risinger
2010-07-23 20:52     ` K. Richard Pixley

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=4C49F5D8.50803@noir.com \
    --to=rich@noir.com \
    --cc=linux-btrfs@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.