projects
/
platform
/
upstream
/
cryptsetup.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cede06
)
crypt_check_data_device_size() needs to compare values in bytes
author
Milan Broz
<gmazyland@gmail.com>
Mon, 22 Aug 2011 21:53:59 +0000
(21:53 +0000)
committer
Milan Broz
<gmazyland@gmail.com>
Mon, 22 Aug 2011 21:53:59 +0000
(21:53 +0000)
(Thanks to okozina@redhat.com)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@602
36d66b0a
-2a48-0410-832c-
cd162a569da5
lib/setup.c
patch
|
blob
|
history
diff --git
a/lib/setup.c
b/lib/setup.c
index 1e5b5ae0538be1d0ffc47e744d688360bed93cfe..b28451402d8dcc1d3cbca37fab426d93c9f67c16 100644
(file)
--- a/
lib/setup.c
+++ b/
lib/setup.c
@@
-512,7
+512,7
@@
static int crypt_check_data_device_size(struct crypt_device *cd)
uint64_t size, size_min;
/* Check data device size, require at least one sector */
- size_min = crypt_get_data_offset(cd) ?: SECTOR_SIZE;
+ size_min = crypt_get_data_offset(cd)
<< SECTOR_SHIFT
?: SECTOR_SIZE;
r = device_size(crypt_get_device_name(cd), &size);
if (r < 0)