All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francis Moreau <francis.moro@gmail.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: losetup: failed to setup loop device > 1
Date: Wed, 08 Oct 2014 12:05:45 +0200	[thread overview]
Message-ID: <54350C79.3080208@gmail.com> (raw)
In-Reply-To: <20141008094453.GF8057@x2.net.home>

On 10/08/2014 11:44 AM, Karel Zak wrote:
> 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 :-)
> 

At least one ;)

> 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()).
> 

in losetup.c, line 638:

		if (hasdev && !is_loopdev(loopcxt_get_device(&lc)))
			loopcxt_add_device(&lc);

I don't really see why having loop-control here or not matter: in both
case you want to stop if loopcxt_add_device() fails, no ?

If it fails then the loop device node, doesn't exist.

Thanks

  reply	other threads:[~2014-10-08 10:03 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
2014-10-08 10:05             ` Francis Moreau [this message]
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=54350C79.3080208@gmail.com \
    --to=francis.moro@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.