TCRYPT: show proper device in status for chained mode
[platform/upstream/cryptsetup.git] / lib / utils_wipe.c
index e6190e4..96a183a 100644 (file)
@@ -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))