Lines Matching refs:ret
100 int ret;
102 ret = bdrv_pread(bs->file, offset, &bitmap, sizeof(bitmap));
103 if (ret < 0) {
104 return ret;
109 ret = bdrv_pwrite_sync(bs->file, offset, &bitmap, sizeof(bitmap));
110 if (ret < 0) {
111 return ret;
120 int ret;
122 ret = bdrv_pread(bs->file, offset, &bitmap, sizeof(bitmap));
123 if (ret < 0) {
124 return ret;
176 int ret, n;
180 ret = bdrv_pread(bs->file,
183 if (ret != n * 512)
188 ret = bdrv_read(bs->backing_hd, sector_num, buf, n);
189 if (ret < 0)
206 int ret;
208 ret = bdrv_pwrite(bs->file, s->cow_sectors_offset + sector_num * 512,
210 if (ret != nb_sectors * 512)
227 int ret;
267 ret = qemu_write_full(cow_fd, &cow_header, sizeof(cow_header));
268 if (ret != sizeof(cow_header)) {
269 ret = -errno;
274 ret = ftruncate(cow_fd, sizeof(cow_header) + ((image_sectors + 7) >> 3));
275 if (ret) {
276 ret = -errno;
282 return ret;