Lines Matching refs:persist_data

302 static struct crypt_persist_data* persist_data = NULL;  variable
843 if (persist_data) { in load_persistent_data()
854 persist_data = pdata; in load_persistent_data()
912 persist_data = pdata; in load_persistent_data()
933 if (persist_data == NULL) { in save_persistent_data()
996 if (unix_write(fd, persist_data, crypt_ftr.persist_data_size) == in save_persistent_data()
2296 if (!persist_data) { in cryptfs_enable_internal()
2300 persist_data = pdata; in cryptfs_enable_internal()
2303 if (persist_data) { in cryptfs_enable_internal()
2520 if (persist_data == NULL) { in persist_get_key()
2523 for (i = 0; i < persist_data->persist_valid_entries; i++) { in persist_get_key()
2524 if (!strncmp(persist_data->persist_entry[i].key, fieldname, PROPERTY_KEY_MAX)) { in persist_get_key()
2526 strlcpy(value, persist_data->persist_entry[i].val, PROPERTY_VALUE_MAX); in persist_get_key()
2539 if (persist_data == NULL) { in persist_set_key()
2545 num = persist_data->persist_valid_entries; in persist_set_key()
2548 if (!strncmp(persist_data->persist_entry[i].key, fieldname, PROPERTY_KEY_MAX)) { in persist_set_key()
2550 memset(persist_data->persist_entry[i].val, 0, PROPERTY_VALUE_MAX); in persist_set_key()
2551 strlcpy(persist_data->persist_entry[i].val, value, PROPERTY_VALUE_MAX); in persist_set_key()
2557 if (persist_data->persist_valid_entries < max_persistent_entries) { in persist_set_key()
2558 memset(&persist_data->persist_entry[num], 0, sizeof(struct crypt_persist_entry)); in persist_set_key()
2559 strlcpy(persist_data->persist_entry[num].key, fieldname, PROPERTY_KEY_MAX); in persist_set_key()
2560 strlcpy(persist_data->persist_entry[num].val, value, PROPERTY_VALUE_MAX); in persist_set_key()
2561 persist_data->persist_valid_entries++; in persist_set_key()
2604 if (persist_data == NULL) { in persist_del_keys()
2608 num = persist_data->persist_valid_entries; in persist_del_keys()
2613 if (!match_multi_entry(persist_data->persist_entry[i].key, fieldname, index)) { in persist_del_keys()
2614 persist_data->persist_entry[j] = persist_data->persist_entry[i]; in persist_del_keys()
2620 persist_data->persist_valid_entries = j; in persist_del_keys()
2622 memset(&persist_data->persist_entry[j], 0, (num - j) * sizeof(struct crypt_persist_entry)); in persist_del_keys()
2634 if (persist_data == NULL) { in persist_count_keys()
2639 for (i = 0; i < persist_data->persist_valid_entries; i++) { in persist_count_keys()
2640 if (match_multi_entry(persist_data->persist_entry[i].key, fieldname, 0)) { in persist_count_keys()
2665 if (persist_data == NULL) { in cryptfs_getfield()
2667 if (persist_data == NULL) { in cryptfs_getfield()
2729 if (persist_data == NULL) { in cryptfs_setfield()
2731 if (persist_data == NULL) { in cryptfs_setfield()
2762 if (persist_data->persist_valid_entries + num_entries - persist_count_keys(fieldname) > in cryptfs_setfield()