public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Drake <dsd@laptop.org>
To: util-linux@vger.kernel.org
Subject: [PATCH] losetup: Fix setting of sizelimit on new loop devices
Date: Fri,  9 Mar 2012 17:56:50 +0000 (GMT)	[thread overview]
Message-ID: <20120309175650.E88509D401E@zog.reactivated.net> (raw)

"losetup --offset 10 --sizelimit 20 foo.img" was producing
a loop device with offset 20 and no sizelimit. Looks like a typo,
fix it.

Signed-off-by: Daniel Drake <dsd@laptop.org>
---
 sys-utils/losetup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c
index 16ace6f..9f03151 100644
--- a/sys-utils/losetup.c
+++ b/sys-utils/losetup.c
@@ -362,7 +362,7 @@ int main(int argc, char **argv)
 			if (flags & LOOPDEV_FL_OFFSET)
 				loopcxt_set_offset(&lc, offset);
 			if (flags & LOOPDEV_FL_SIZELIMIT)
-				loopcxt_set_offset(&lc, sizelimit);
+				loopcxt_set_sizelimit(&lc, sizelimit);
 			if (lo_flags)
 				loopcxt_set_flags(&lc, lo_flags);
 			if ((res = loopcxt_set_backing_file(&lc, file))) {
-- 
1.7.7.6


             reply	other threads:[~2012-03-09 17:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09 17:56 Daniel Drake [this message]
2012-03-13 11:27 ` [PATCH] losetup: Fix setting of sizelimit on new loop devices 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=20120309175650.E88509D401E@zog.reactivated.net \
    --to=dsd@laptop.org \
    --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