mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 20:30:04 +01:00
Add backing device info into status.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@445 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
2011-04-11 Milan Broz <mbroz@redhat.com>
|
2011-04-11 Milan Broz <mbroz@redhat.com>
|
||||||
* Add loop manipulation code and support mapping of images in file.
|
* Add loop manipulation code and support mapping of images in file.
|
||||||
|
* Add backing device loop info into status message.
|
||||||
|
|
||||||
2011-04-05 Milan Broz <mbroz@redhat.com>
|
2011-04-05 Milan Broz <mbroz@redhat.com>
|
||||||
* Add exception to COPYING for binary distribution linked with OpenSSL library.
|
* Add exception to COPYING for binary distribution linked with OpenSSL library.
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include "nls.h"
|
#include "nls.h"
|
||||||
#include "utils_crypt.h"
|
#include "utils_crypt.h"
|
||||||
|
#include "utils_loop.h"
|
||||||
|
|
||||||
#define SECTOR_SHIFT 9
|
#define SECTOR_SHIFT 9
|
||||||
#define SECTOR_SIZE (1 << SECTOR_SHIFT)
|
#define SECTOR_SIZE (1 << SECTOR_SHIFT)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ INCLUDES = \
|
|||||||
|
|
||||||
cryptsetup_SOURCES = \
|
cryptsetup_SOURCES = \
|
||||||
$(top_builddir)/lib/utils_crypt.c \
|
$(top_builddir)/lib/utils_crypt.c \
|
||||||
|
$(top_builddir)/lib/utils_loop.c \
|
||||||
cryptsetup.c \
|
cryptsetup.c \
|
||||||
cryptsetup.h
|
cryptsetup.h
|
||||||
|
|
||||||
|
|||||||
@@ -319,6 +319,8 @@ static int action_status(int arg)
|
|||||||
crypt_status_info ci;
|
crypt_status_info ci;
|
||||||
struct crypt_active_device cad;
|
struct crypt_active_device cad;
|
||||||
struct crypt_device *cd = NULL;
|
struct crypt_device *cd = NULL;
|
||||||
|
char *backing_file;
|
||||||
|
const char *device;
|
||||||
int r = 0;
|
int r = 0;
|
||||||
|
|
||||||
ci = crypt_status(NULL, action_argv[0]);
|
ci = crypt_status(NULL, action_argv[0]);
|
||||||
@@ -345,7 +347,13 @@ static int action_status(int arg)
|
|||||||
|
|
||||||
log_std(" cipher: %s-%s\n", crypt_get_cipher(cd), crypt_get_cipher_mode(cd));
|
log_std(" cipher: %s-%s\n", crypt_get_cipher(cd), crypt_get_cipher_mode(cd));
|
||||||
log_std(" keysize: %d bits\n", crypt_get_volume_key_size(cd) * 8);
|
log_std(" keysize: %d bits\n", crypt_get_volume_key_size(cd) * 8);
|
||||||
log_std(" device: %s\n", crypt_get_device_name(cd));
|
device = crypt_get_device_name(cd);
|
||||||
|
log_std(" device: %s\n", device);
|
||||||
|
if (crypt_loop_device(device)) {
|
||||||
|
backing_file = crypt_loop_backing_file(device);
|
||||||
|
log_std(" loop: %s\n", backing_file);
|
||||||
|
free(backing_file);
|
||||||
|
}
|
||||||
log_std(" offset: %" PRIu64 " sectors\n", cad.offset);
|
log_std(" offset: %" PRIu64 " sectors\n", cad.offset);
|
||||||
log_std(" size: %" PRIu64 " sectors\n", cad.size);
|
log_std(" size: %" PRIu64 " sectors\n", cad.size);
|
||||||
if (cad.iv_offset)
|
if (cad.iv_offset)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "lib/nls.h"
|
#include "lib/nls.h"
|
||||||
#include "lib/utils_crypt.h"
|
#include "lib/utils_crypt.h"
|
||||||
|
#include "lib/utils_loop.h"
|
||||||
|
|
||||||
#define DEFAULT_CIPHER(type) (DEFAULT_##type##_CIPHER "-" DEFAULT_##type##_MODE)
|
#define DEFAULT_CIPHER(type) (DEFAULT_##type##_CIPHER "-" DEFAULT_##type##_MODE)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user