Lines Matching refs:id_str
45 /* id_str follows */
56 qemu_free(s->snapshots[i].id_str);
99 sn->id_str = qemu_malloc(id_str_size + 1);
100 if (bdrv_pread(bs->file, offset, sn->id_str, id_str_size) != id_str_size)
103 sn->id_str[id_str_size] = '\0';
135 offset += strlen(sn->id_str);
156 id_str_size = strlen(sn->id_str);
164 if (bdrv_pwrite_sync(bs->file, offset, sn->id_str, id_str_size) < 0)
192 char *id_str, int id_str_size)
200 id = strtoul(sn->id_str, NULL, 10);
204 snprintf(id_str, id_str_size, "%d", id_max + 1);
207 static int find_snapshot_by_id(BlockDriverState *bs, const char *id_str)
213 if (!strcmp(s->snapshots[i].id_str, id_str))
245 if (sn_info->id_str[0] == '\0') {
247 find_new_snapshot_id(bs, sn_info->id_str, sizeof(sn_info->id_str));
251 if (find_snapshot_by_id(bs, sn_info->id_str) >= 0)
254 sn->id_str = qemu_strdup(sn_info->id_str);
255 if (!sn->id_str)
375 qemu_free(sn->id_str);
406 pstrcpy(sn_info->id_str, sizeof(sn_info->id_str),
407 sn->id_str);