struct swap_file_control {
char crypt_type[MAX_TYPE_LENGTH];
char swapfile[64];
- long swap_file_size;
- unsigned long swap_reclaim_bytes;
+ unsigned long long swap_file_bytes;
+ unsigned long long swap_reclaim_bytes;
};
static struct swap_file_control file_control = {
.crypt_type = "aes",
.swapfile = SWAP_FILE_NAME,
- .swap_file_size = DEFAULT_SWAP_FILE_SIZE,
+ .swap_file_bytes = DEFAULT_SWAP_FILE_SIZE,
.swap_reclaim_bytes = 0,
};
struct swap_module_ops *swap = (struct swap_module_ops *)data;
file_control.swap_reclaim_bytes =
- file_control.swap_file_size * FILESWAP_FULLNESS_RATIO;
+ file_control.swap_file_bytes * FILESWAP_FULLNESS_RATIO;
return swap_set_file(file_control.swapfile, swap, file_control.crypt_type);
}
{
struct swap_module_ops *swap = (struct swap_module_ops *)data;
_cleanup_proc_swaps_free_ struct proc_swaps **swaps = NULL;
- unsigned int swap_size = 0;
+ unsigned long long swap_size = 0;
int n, i;
n = proc_get_swaps(&swaps);
{
struct swap_module_ops *swap = (struct swap_module_ops *)data;
- swap->k_size = BYTE_TO_KBYTE(file_control.swap_file_size);
+ swap->k_size = BYTE_TO_KBYTE(file_control.swap_file_bytes);
return 0;
}
static int swap_file_conf(void *data)
{
_I("[SWAP] fileswap crypt type = %s", file_control.crypt_type);
- _I("[SWAP] fileswap file size = %ld", file_control.swap_file_size);
+ _I("[SWAP] fileswap file size = %llu bytes", file_control.swap_file_bytes);
return RESOURCED_ERROR_NONE;
}