Print a warning if system encryption is used and device is a partition.

System encryption hav metadata in space located ouside of
partition itself.

Ideally the check should be automatic but for virtualized systems
(where a partition could be "whole device" for another sustem this
can be dangerous.
This commit is contained in:
Milan Broz
2013-06-23 15:26:45 +02:00
parent a36de633d5
commit 42b0ab437a
3 changed files with 33 additions and 6 deletions

View File

@@ -97,6 +97,7 @@ int crypt_confirm(struct crypt_device *cd, const char *msg);
char *crypt_lookup_dev(const char *dev_id);
int crypt_sysfs_get_rotational(int major, int minor, int *rotational);
int crypt_sysfs_get_partition(const char *dev_path, int *partition);
ssize_t write_blockwise(int fd, int bsize, void *buf, size_t count);
ssize_t read_blockwise(int fd, int bsize, void *_buf, size_t count);