encrypt variable conflict with glibc::encrypt() Rename it to encrypt_on ---
diff -urNp suspend.org/suspend.c suspend-0.6_beta1/suspend.c --- suspend.org/suspend.c 2007-07-29 21:30:27.000000000 +0300 +++ suspend-0.6_beta1/suspend.c 2007-08-02 23:55:20.000000000 +0300 @@ -68,10 +68,10 @@ static char compress; #ifdef CONFIG_ENCRYPT -static char encrypt; +static char encrypt_on; static char use_RSA; static char key_name[MAX_STR_LEN] = KEY_FILE; static char password[PASS_SIZE]; #else -#define encrypt 0 +#define encrypt_on 0 #define key_name NULL #endif #ifdef CONFIG_BOTH @@ -142,7 +137,7 @@ static struct config_par parameters[PARA { .name = "encrypt", .fmt = "%c", - .ptr = &encrypt, + .ptr = &encrypt_on, }, { .name = "RSA key file", @@ -350,7 +347,7 @@ static int flush_buffer(struct swap_map_ int error = 0; #ifdef CONFIG_ENCRYPT - if (encrypt) { + if (encrypt_on) { error = gcry_cipher_encrypt(cipher_handle, handle->encrypt_buffer, handle->cur_area.size, src, handle->cur_area.size); @@ -610,7 +607,7 @@ int write_image(int snapshot_fd, int res } #ifdef CONFIG_ENCRYPT - if (encrypt) { + if (encrypt_on) { if (use_RSA) { error = gcry_cipher_setkey(cipher_handle, key_data->key, KEY_SIZE); @@ -1325,8 +1321,8 @@ int main(int argc, char *argv[]) compress = 0; #endif #ifdef CONFIG_ENCRYPT - if (encrypt != 'y' && encrypt != 'Y') - encrypt = 0; + if (encrypt_on != 'y' && encrypt_on != 'Y') + encrypt_on = 0; #endif if (splash_param != 'y' && splash_param != 'Y') splash_param = 0; @@ -1534,5 +1534,5 @@ int main(int argc, char *argv[]) #ifdef CONFIG_ENCRYPT - if (encrypt) + if (encrypt_on) mem_size += buffer_size; #endif mem_pool = malloc(mem_size); @@ -1361,7 +1365,7 @@ int main(int argc, char *argv[]) return ret; } #ifdef CONFIG_ENCRYPT - if (encrypt) { + if (encrypt_on) { printf("%s: libgcrypt version: %s\n", my_name, gcry_check_version(NULL)); gcry_control(GCRYCTL_INIT_SECMEM, page_size, 0); @@ -1370,10 +1374,10 @@ int main(int argc, char *argv[]) if (ret) { fprintf(stderr, "%s: libgcrypt error %s\n", my_name, gcry_strerror(ret)); - encrypt = 0; + encrypt_on = 0; } } - if (encrypt) { + if (encrypt_on) { mem_size -= buffer_size; key_data = (struct key_data *)((char *)mem_pool + mem_size); generate_key(); @@ -1474,7 +1478,7 @@ int main(int argc, char *argv[]) s2ram = !s2ram_hacks(); #endif #ifdef CONFIG_ENCRYPT - if (encrypt && ! use_RSA) { + if (encrypt_on && ! use_RSA) { splash.read_password((char *)mem_pool,1); strncpy(password,(char *)mem_pool,PASS_SIZE); } @@ -1524,8 +1528,8 @@ Umount: } else { umount(chroot_path); } #ifdef CONFIG_ENCRYPT - if (encrypt) + if (encrypt_on) gcry_cipher_close(cipher_handle); #endif free(mem_pool); ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel