Lines Matching refs:rc

34 	int rc = 0;  in delete_and_verify_items()  local
36 rc = zms_delete(fs, id); in delete_and_verify_items()
37 if (rc) { in delete_and_verify_items()
40 rc = zms_get_data_length(fs, id); in delete_and_verify_items()
41 if (rc > 0) { in delete_and_verify_items()
47 printk("Error while deleting item rc=%d\n", rc); in delete_and_verify_items()
48 return rc; in delete_and_verify_items()
56 int rc = 0; in delete_basic_items() local
58 rc = delete_and_verify_items(fs, IP_ADDRESS_ID); in delete_basic_items()
59 if (rc) { in delete_basic_items()
60 printk("Error while deleting item %x rc=%d\n", IP_ADDRESS_ID, rc); in delete_basic_items()
61 return rc; in delete_basic_items()
63 rc = delete_and_verify_items(fs, KEY_VALUE_ID); in delete_basic_items()
64 if (rc) { in delete_basic_items()
65 printk("Error while deleting item %x rc=%d\n", KEY_VALUE_ID, rc); in delete_basic_items()
66 return rc; in delete_basic_items()
68 rc = delete_and_verify_items(fs, CNT_ID); in delete_basic_items()
69 if (rc) { in delete_basic_items()
70 printk("Error while deleting item %x rc=%d\n", CNT_ID, rc); in delete_basic_items()
71 return rc; in delete_basic_items()
73 rc = delete_and_verify_items(fs, LONG_DATA_ID); in delete_basic_items()
74 if (rc) { in delete_basic_items()
75 printk("Error while deleting item %x rc=%d\n", LONG_DATA_ID, rc); in delete_basic_items()
78 return rc; in delete_basic_items()
83 int rc = 0; in main() local
107 rc = flash_get_page_info_by_offs(fs.flash_device, fs.offset, &info); in main()
108 if (rc) { in main()
109 printk("Unable to get page info, rc=%d\n", rc); in main()
116 rc = zms_mount(&fs); in main()
117 if (rc) { in main()
118 printk("Storage Init failed, rc=%d\n", rc); in main()
127 rc = zms_read(&fs, IP_ADDRESS_ID, &buf, sizeof(buf)); in main()
128 if (rc > 0) { in main()
130 buf[rc] = '\0'; in main()
136 rc = zms_write(&fs, IP_ADDRESS_ID, &buf, strlen(buf)); in main()
137 if (rc < 0) { in main()
138 printk("Error while writing Entry rc=%d\n", rc); in main()
145 rc = zms_read(&fs, KEY_VALUE_ID, &key, sizeof(key)); in main()
146 if (rc > 0) { /* item was found, show it */ in main()
155 rc = zms_write(&fs, KEY_VALUE_ID, &key, sizeof(key)); in main()
156 if (rc < 0) { in main()
157 printk("Error while writing Entry rc=%d\n", rc); in main()
164 rc = zms_read(&fs, CNT_ID, &i_cnt, sizeof(i_cnt)); in main()
165 if (rc > 0) { /* item was found, show it */ in main()
172 rc = zms_write(&fs, CNT_ID, &i, sizeof(i)); in main()
173 if (rc < 0) { in main()
174 printk("Error while writing Entry rc=%d\n", rc); in main()
181 rc = zms_read(&fs, LONG_DATA_ID, &longarray, sizeof(longarray)); in main()
182 if (rc > 0) { in main()
192 rc = zms_write(&fs, LONG_DATA_ID, &longarray, sizeof(longarray)); in main()
193 if (rc < 0) { in main()
194 printk("Error while writing Entry rc=%d\n", rc); in main()
200 rc = delete_basic_items(&fs); in main()
201 if (rc) { in main()
208 printk("Error: Something went wrong at iteration %u rc=%d\n", i, rc); in main()
214 rc = zms_write(&fs, id, &id, sizeof(uint32_t)); in main()
215 if (rc < 0) { in main()
221 if (rc == -ENOSPC) { in main()
236 rc = delete_and_verify_items(&fs, n); in main()
237 if (rc) { in main()
242 rc = delete_basic_items(&fs); in main()
243 if (rc) { in main()
254 rc = zms_sector_use_next(&fs); in main()
255 if (rc) { in main()
256 printk("Error while changing sector rc=%d\n", rc); in main()
267 rc = zms_clear(&fs); in main()
268 if (rc < 0) { in main()
269 printk("Error while cleaning the storage, rc=%d\n", rc); in main()