Lines Matching refs:buf

283     char *buf, *ret_buf = NULL;  in xenhypfs_read()  local
287 buf = xenhypfs_read_raw(fshdl, path, &dirent); in xenhypfs_read()
288 if (!buf) in xenhypfs_read()
295 ret_buf = xenhypfs_inflate(buf, &dirent->size); in xenhypfs_read()
298 free(buf); in xenhypfs_read()
299 buf = ret_buf; in xenhypfs_read()
312 ret_buf = buf; in xenhypfs_read()
313 buf = NULL; in xenhypfs_read()
319 ret = asprintf(&ret_buf, "%"PRIu8, *(uint8_t *)buf); in xenhypfs_read()
322 ret = asprintf(&ret_buf, "%"PRIu16, *(uint16_t *)buf); in xenhypfs_read()
325 ret = asprintf(&ret_buf, "%"PRIu32, *(uint32_t *)buf); in xenhypfs_read()
328 ret = asprintf(&ret_buf, "%"PRIu64, *(uint64_t *)buf); in xenhypfs_read()
340 ret = asprintf(&ret_buf, "%"PRId8, *(int8_t *)buf); in xenhypfs_read()
343 ret = asprintf(&ret_buf, "%"PRId16, *(int16_t *)buf); in xenhypfs_read()
346 ret = asprintf(&ret_buf, "%"PRId32, *(int32_t *)buf); in xenhypfs_read()
349 ret = asprintf(&ret_buf, "%"PRId64, *(int64_t *)buf); in xenhypfs_read()
362 free(buf); in xenhypfs_read()
373 void *buf, *curr; in xenhypfs_readdir() local
380 buf = xenhypfs_read_raw(fshdl, path, &dirent); in xenhypfs_readdir()
381 if (!buf) in xenhypfs_readdir()
391 curr = buf; in xenhypfs_readdir()
408 curr = buf; in xenhypfs_readdir()
420 free(buf); in xenhypfs_readdir()
429 void *buf = NULL; in xenhypfs_write() local
444 buf = xencall_alloc_buffer(fshdl->xcall, sz); in xenhypfs_write()
445 if (!buf) { in xenhypfs_write()
452 (unsigned long)buf, sizeof(*entry)); in xenhypfs_write()
456 entry = buf; in xenhypfs_write()
471 xencall_free_buffer(fshdl->xcall, buf); in xenhypfs_write()
472 buf = xencall_alloc_buffer(fshdl->xcall, sz); in xenhypfs_write()
473 if (!buf) { in xenhypfs_write()
479 strcpy(buf, val); in xenhypfs_write()
484 *(unsigned long long *)buf = strtoull(val, &val_end, 0); in xenhypfs_write()
488 if ((*(uint64_t *)buf & mask) && ((*(uint64_t *)buf & mask) != mask)) { in xenhypfs_write()
496 *(unsigned long long *)buf = strtoll(val, &val_end, 0); in xenhypfs_write()
500 if ((*(uint64_t *)buf & mask) && ((*(uint64_t *)buf & mask) != mask)) { in xenhypfs_write()
507 *(unsigned long long *)buf = 0; in xenhypfs_write()
510 *(unsigned long long *)buf = 1; in xenhypfs_write()
526 (unsigned long)buf, sz); in xenhypfs_write()
531 xencall_free_buffer(fshdl->xcall, buf); in xenhypfs_write()