Lines Matching full:pdata
673 static void init_empty_persist_data(struct crypt_persist_data *pdata, int len)
675 memset(pdata, 0, len);
676 pdata->persist_magic = PERSIST_DATA_MAGIC;
677 pdata->persist_valid_entries = 0;
691 struct crypt_persist_data *pdata;
696 pdata = malloc(CRYPT_PERSIST_DATA_SIZE);
697 if (pdata == NULL) {
701 memset(pdata, 0, CRYPT_PERSIST_DATA_SIZE);
706 free(pdata);
710 unix_write(fd, pdata, CRYPT_PERSIST_DATA_SIZE);
713 init_empty_persist_data(pdata, CRYPT_PERSIST_DATA_SIZE);
714 unix_write(fd, pdata, CRYPT_PERSIST_DATA_SIZE);
721 free(pdata);
847 struct crypt_persist_data *pdata = NULL;
864 pdata = malloc(CRYPT_PERSIST_DATA_SIZE);
865 if (pdata) {
866 init_empty_persist_data(pdata, CRYPT_PERSIST_DATA_SIZE);
867 persist_data = pdata;
898 pdata = malloc(crypt_ftr.persist_data_size);
899 if (pdata == NULL) {
909 if (unix_read(fd, pdata, crypt_ftr.persist_data_size) < 0){
913 if (pdata->persist_magic == PERSIST_DATA_MAGIC) {
921 init_empty_persist_data(pdata, crypt_ftr.persist_data_size);
925 persist_data = pdata;
930 free(pdata);
940 struct crypt_persist_data *pdata;
977 pdata = malloc(crypt_ftr.persist_data_size);
978 if (pdata == NULL) {
988 if (unix_read(fd, pdata, crypt_ftr.persist_data_size) < 0) {
993 if (pdata->persist_magic == PERSIST_DATA_MAGIC) {
1017 memset(pdata, 0, crypt_ftr.persist_data_size);
1018 if (unix_write(fd, pdata, crypt_ftr.persist_data_size) !=
1030 free(pdata);
1035 free(pdata);
2945 struct crypt_persist_data *pdata;
3153 pdata = malloc(CRYPT_PERSIST_DATA_SIZE);
3154 if (pdata) {
3155 init_empty_persist_data(pdata, CRYPT_PERSIST_DATA_SIZE);
3156 persist_data = pdata;