[Suspend2][ 10/12] [Suspend2] Encryption proc entries.

From: Nigel Cunningham
Date: Tue Jun 27 2006 - 01:10:50 EST


Add data for the encryption related proc entries.

Signed-off-by: Nigel Cunningham <nigel@xxxxxxxxxxxx>

kernel/power/encryption.c | 82 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 82 insertions(+), 0 deletions(-)

diff --git a/kernel/power/encryption.c b/kernel/power/encryption.c
index 1664b82..4e309e3 100644
--- a/kernel/power/encryption.c
+++ b/kernel/power/encryption.c
@@ -400,3 +400,85 @@ static void suspend_encrypt_load_config_
}
return;
}
+
+/*
+ * data for our proc entries.
+ */
+static struct suspend_proc_data proc_params[] = {
+{
+ .filename = "encryptor",
+ .permissions = PROC_RW,
+ .type = SUSPEND_PROC_DATA_STRING,
+ .data = {
+ .string = {
+ .variable = suspend_encryptor_name,
+ .max_length = 31,
+ }
+ },
+},
+
+{
+ .filename = "encryption_mode",
+ .permissions = PROC_RW,
+ .type = SUSPEND_PROC_DATA_INTEGER,
+ .data = {
+ .integer = {
+ .variable = &suspend_encryptor_mode,
+ .minimum = 0,
+ .maximum = 3,
+ }
+ }
+},
+
+{
+ .filename = "encryption_save_key_and_iv",
+ .permissions = PROC_RW,
+ .type = SUSPEND_PROC_DATA_INTEGER,
+ .data = {
+ .integer = {
+ .variable = &suspend_encryptor_save_key_and_iv,
+ .minimum = 0,
+ .maximum = 1,
+ }
+ }
+},
+
+{
+ .filename = "encryption_key",
+ .permissions = PROC_RW,
+ .type = SUSPEND_PROC_DATA_STRING,
+ .data = {
+ .string = {
+ .variable = suspend_encryptor_key,
+ .max_length = 255,
+ }
+ }
+},
+
+{
+ .filename = "encryption_iv",
+ .permissions = PROC_RW,
+ .type = SUSPEND_PROC_DATA_STRING,
+ .data = {
+ .string = {
+ .variable = suspend_encryptor_iv,
+ .max_length = 255,
+ }
+ }
+},
+
+{
+ .filename = "disable_encryption",
+ .permissions = PROC_RW,
+ .type = SUSPEND_PROC_DATA_INTEGER,
+ .data = {
+ .integer = {
+ .variable = &suspend_encryption_ops.disabled,
+ .minimum = 0,
+ .maximum = 1,
+ }
+ }
+},
+
+};
+

--
Nigel Cunningham nigel at suspend2 dot net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/