Commit Graph

31 Commits

Author SHA1 Message Date
Sami Kerola e0b0676988 losetup: fix declarations [smatch scan]
sys-utils/losetup.c:309:2: error: 'for' loop initial declarations are only allowed in C99 mode
sys-utils/losetup.c:374:2: error: 'for' loop initial declarations are only allowed in C99 mode

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-01-09 13:37:23 +01:00
Karel Zak 65178cb3f2 losetup: allow to use -O without --list
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-12 14:36:29 +01:00
Karel Zak 4ad996d7f9 losetup: rename SIZE->SIZELIMIT
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-12 13:24:45 +01:00
Ondrej Oprala 896352d390 losetup: add --list and --output option
The --list --all is the default output:

  # losetup
  NAME       SIZE OFFSET AUTOCLEAR RO BACK-FILE
  /dev/loop0    0      0         0  0 /home/fs-images/swap.img
  /dev/loop1    0    100         0  0 /home/fs-images/disk.img

[kzak@redhat.com: - default to --all if no device specified,
                  - cleanup column names (add BACK- prefix)
                  - add MAJ:MIN to of the loopdev device]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-12 13:08:00 +01:00
Karel Zak f4bf95926a lib/loopdev: improve debug messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-10-17 11:42:21 +02:00
Ludwig Nussel 5cf05c7147 mount: losetup: remove obsolete encryption support
kernel cryptoloop is deprecated since ages and support for cryptoloop
in util-linux is incomplete/broken.
- no password hashing
- last 8 bit of key are always set to zero
- no binary keys possible (stops reading key at \n and \0)

In the past some Distros added the above features with patches. So
remove cryptoloop support from util-linux completely to make sure
people won't try using it.

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-11 10:46:11 +02:00
Benno Schulenberg e9e7698eb4 textual: add missing comma and colon in some help texts
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2012-09-04 17:27:50 +02:00
Karel Zak c1ac31445c losetup: use err_exclusive_options()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-26 09:25:59 +02:00
Sami Kerola 289dcc9023 translation: unify file open error messages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:22 +02:00
Karel Zak defa0710b6 lib/loopdev: use warn_unused_result forimportant functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-21 10:40:43 +02:00
Sami Kerola 96801c4826 losetup: use exclusive_option()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Karel Zak 3554545636 losetup: warn about backing file size
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=730266
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-12 14:34:16 +02:00
Karel Zak cda4f8f10b losetup: more verbose failed setup error mesage
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-28 11:36:59 +02:00
Karel Zak 20a3998222 sys-utils: cleanup strtoxx_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-15 17:45:17 +02:00
Sami Kerola efb8854f4c sys-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-04 19:49:40 +02:00
Karel Zak e9e426eb78 losetup: use strtosize_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-30 16:18:30 +02:00
Daniel Drake ce65b29ac4 losetup: Fix setting of sizelimit on new loop devices
"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>
2012-03-13 12:21:49 +01:00
Karel Zak a3b421dfac losetup: fix compiler warnings [-Wpointer-sign -Wformat]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:36:55 +01:00
Karel Zak 6c503d5916 losetup: move xgetpass() to lib/xgetpass.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-11 15:17:06 +01:00
Karel Zak 916bf85e62 losetup: add --partscan option
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-09 23:28:50 +01:00
Karel Zak 934df30dd0 losetup: cleanup headers, cmdline checks
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:20:07 +01:00
Karel Zak aadb930377 losetup: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:19:38 +01:00
Karel Zak 6da69b83a6 losetup: check to control debug output
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:19:38 +01:00
Karel Zak 09ec0c0a97 losetup: print info about one device
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:19:38 +01:00
Karel Zak c7e0925def losetup: rewrite loop setup
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:19:38 +01:00
Karel Zak bcdbdc72cb losetup: rewrite -f
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:19:38 +01:00
Karel Zak c654c4f0a3 losetup: rewrite -d and -D
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:19:38 +01:00
Karel Zak 6e90a44c1e losetup: rewrite -c
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:19:38 +01:00
Karel Zak bc0ac075a9 losetup: rewrite -j
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:19:38 +01:00
Karel Zak 39fde1373d losetup: rewrite -a
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:19:38 +01:00
Karel Zak bd6d0d039c losetup: move to sys-utils directory
Now losetup(8) is independent on mount/ stuff at all.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-20 13:07:54 +01:00