util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Francis Moreau <francis.moro@gmail.com>
Cc: util-linux@vger.kernel.org
Subject: Re: losetup: failed to setup loop device > 1
Date: Wed, 8 Oct 2014 11:44:53 +0200	[thread overview]
Message-ID: <20141008094453.GF8057@x2.net.home> (raw)
In-Reply-To: <5434FC75.7060209@gmail.com>

On Wed, Oct 08, 2014 at 10:57:25AM +0200, Francis Moreau wrote:
> In HEAD of the git tree, in file losetup.c, the return value of
> loopcxt_add_device() is not checked in main().
> 
> Is this expected ?

Good question :-)

The loop-control is optional (from the code point of view). If the system 
does not have control file (old kernels) and on command line specified loop
device does not exist then it will end with open() error later
(in loopcxt_setup_device()).

Yes, we can improve the main() and add an error message there, but no
sure how usable it will be for end-users (open() errors are pretty
obvious compare to all possible situations in loopcxt_add_device()).

 Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2014-10-08  9:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-06 16:35 losetup: failed to setup loop device > 1 Francis Moreau
2014-10-06 17:40 ` Karel Zak
2014-10-06 20:59   ` Francis Moreau
2014-10-07  9:17     ` Karel Zak
2014-10-07  9:32       ` Francis Moreau
2014-10-08  8:57         ` Francis Moreau
2014-10-08  9:44           ` Karel Zak [this message]
2014-10-08 10:05             ` Francis Moreau
2014-10-08 10:58       ` Francis Moreau

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=20141008094453.GF8057@x2.net.home \
    --to=kzak@redhat.com \
    --cc=francis.moro@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).