util-linux/lib
Karel Zak a7d5202b5e losetup: don't require 512-byte aligned offsets
Kernel aligns the device size, but the offset where the device starts
is not required to be aligned.

 # losetup --offset 32 -f file.img

is just fine, the final size of the look device will be (in sectors)

  (backing_file_size - offset) >> 9

so we have to do the same in userspace when we check for successful
set capacity ioctl.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-10-01 15:52:11 +02:00
..
Makemodule.am lib: add crc64() 2013-09-11 16:40:06 +02:00
at.c include: cleanup copyright headers 2013-01-08 15:10:17 +01:00
blkdev.c loopdev: sync capacity after setting it 2013-04-09 14:32:50 +02:00
canonicalize.c lib/canonical: use realpath() from libc 2013-07-01 16:13:46 +02:00
colors.c fdisk: add -L to colorize output 2013-09-16 16:47:09 +02:00
cpuset.c include: cleanup copyright headers 2013-01-08 15:10:17 +01:00
crc32.c lib: add a generic crc32() 2009-09-16 16:17:41 +02:00
crc64.c lib: add crc64() 2013-09-11 16:40:06 +02:00
env.c build-sys: test for secure_getenv() too. 2013-02-06 12:03:22 +01:00
exec_shell.c exec_shell: add a license and touch up func def 2013-07-01 11:46:13 +02:00
fileutils.c lib: use O_CLOEXEC in libcommon 2013-04-03 16:13:06 +02:00
ismounted.c lib: use O_CLOEXEC in libcommon 2013-04-03 16:13:06 +02:00
langinfo.c lib: add fallback for nl_langinfo() 2010-11-15 16:42:45 +01:00
linux_version.c lib: [linux_version.c] simplify version parsing 2011-06-20 13:48:40 +02:00
loopdev.c losetup: don't require 512-byte aligned offsets 2013-10-01 15:52:11 +02:00
mangle.c lib/mangle: remove unused variable 2012-08-13 21:57:34 +02:00
match.c lib/match: fix compiler warning [-Wmissing-prototypes] 2012-07-16 18:29:22 +02:00
mbsalign.c lib/mbsalign: initializations values are never read [clang-analyzer] 2013-07-09 14:25:02 +02:00
md5.c md5: fix strict aliasing warnings 2012-10-10 11:23:24 +02:00
pager.c lib: remove unused code 2013-06-07 12:24:40 +02:00
path.c lib: use O_CLOEXEC in libcommon 2013-04-03 16:13:06 +02:00
procutils.c lib/procutils: add simple API to scan /proc/PID/* 2013-03-12 17:24:14 +01:00
randutils.c lib: use O_CLOEXEC in libcommon 2013-04-03 16:13:06 +02:00
setproctitle.c lib: cleanup setproctitle.c 2011-10-26 23:17:15 +02:00
strutils.c lib/strutils: optimalize {starts,ends}with() 2013-09-10 12:18:20 +02:00
sysfs.c lib: use O_CLOEXEC in libcommon 2013-04-03 16:13:06 +02:00
timeutils.c lib: rename time-util.c to timeutils.c, fix headers 2013-09-10 13:11:02 +02:00
tt.c lib/tt: add TT_FL_FREEDATA 2013-09-16 16:46:53 +02:00
ttyutils.c lib/tty: fix get_terminal_name() usage, cleanup code 2013-05-28 12:10:29 +02:00
wholedisk.c lib: use O_CLOEXEC in libcommon 2013-04-03 16:13:06 +02:00
xgetpass.c losetup: make xgetpass more robust 2012-01-17 17:02:34 +01:00