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:
5b5c6dc
)
Do not scan rotational flag for non-block devices / file images.
author
Milan Broz
<gmazyland@gmail.com>
Mon, 27 Aug 2012 10:42:15 +0000
(12:42 +0200)
committer
Milan Broz
<gmazyland@gmail.com>
Mon, 27 Aug 2012 10:42:15 +0000
(12:42 +0200)
lib/utils_wipe.c
patch
|
blob
|
history
diff --git
a/lib/utils_wipe.c
b/lib/utils_wipe.c
index e6190e40f913277c2c743036d9532e2e4b20d7dd..96a183aa1b54f00f17199e031cb483256c32b7d9 100644
(file)
--- a/
lib/utils_wipe.c
+++ b/
lib/utils_wipe.c
@@
-136,7
+136,8
@@
int crypt_wipe(struct device *device,
return -EINVAL;
}
- if (type == CRYPT_WIPE_DISK) {
+ if (type == CRYPT_WIPE_DISK && S_ISBLK(st.st_mode)) {
+ rotational = 0;
if (!crypt_sysfs_get_rotational(major(st.st_rdev),
minor(st.st_rdev),
&rotational))