cur_ts = sw->hw->ts_helper;
old_ts = ts->old_ts;
- /* dolog ("cur %lld old %lld\n", cur_ts, old_ts); */
+ /* dolog ("cur %" PRId64 " old %" PRId64 "\n", cur_ts, old_ts); */
if (cur_ts >= old_ts) {
delta = cur_ts - old_ts;
{
CURLState *s = ((CURLState*)opaque);
size_t realsize = size * nmemb;
- long long fsize;
+ size_t fsize;
- if(sscanf(ptr, "Content-Length: %lld", &fsize) == 1)
+ if(sscanf(ptr, "Content-Length: %zd", &fsize) == 1) {
s->s->len = fsize;
+ }
return realsize;
}
size_t realsize = size * nmemb;
int i;
- DPRINTF("CURL: Just reading %lld bytes\n", (unsigned long long)realsize);
+ DPRINTF("CURL: Just reading %zd bytes\n", realsize);
if (!s || !s->orig_buf)
goto read_end;
s->len = (size_t)d;
else if(!s->len)
goto out;
- DPRINTF("CURL: Size = %lld\n", (long long)s->len);
+ DPRINTF("CURL: Size = %zd\n", s->len);
curl_clean_state(state);
curl_easy_cleanup(state->curl);
state->orig_buf = qemu_malloc(state->buf_len);
state->acb[0] = acb;
- snprintf(state->range, 127, "%lld-%lld", (long long)start, (long long)end);
- DPRINTF("CURL (AIO): Reading %d at %lld (%s)\n", (nb_sectors * SECTOR_SIZE), start, state->range);
+ snprintf(state->range, 127, "%zd-%zd", start, end);
+ DPRINTF("CURL (AIO): Reading %d at %zd (%s)\n",
+ (nb_sectors * SECTOR_SIZE), start, state->range);
curl_easy_setopt(state->curl, CURLOPT_RANGE, state->range);
curl_multi_add_handle(s->multi, state->curl);
#endif
if (bdrv_pread(bs->file, offset, &ext, sizeof(ext)) != sizeof(ext)) {
- fprintf(stderr, "qcow_handle_extension: ERROR: pread fail from offset %llu\n",
- (unsigned long long)offset);
+ fprintf(stderr, "qcow_handle_extension: ERROR: "
+ "pread fail from offset %" PRIu64 "\n",
+ offset);
return 1;
}
be32_to_cpus(&ext.magic);
k++;
while (k < nb_clusters && get_refcount(bs, k) == refcount)
k++;
- printf("%lld: refcount=%d nb=%lld\n", k, refcount, k - k1);
+ printf("%" PRId64 ": refcount=%d nb=%" PRId64 "\n", k, refcount,
+ k - k1);
}
}
#endif
uint64_t *value = (uint64_t*)((CPUX86State*)cpu_env)->regs[R_ESI];
old = (uint64_t)((uint64_t)((CPUX86State*)cpu_env)->regs[R_EDX]) << 32 | (uint64_t)((CPUX86State*)cpu_env)->regs[R_EAX];
- DPRINTF("commpage: compare_and_swap64(%llx,new,%p)\n", old, value);
+ DPRINTF("commpage: compare_and_swap64(%" PRIx64 ",new,%p)\n", old, value);
swapped_val = tswap64(*value);
if(old == swapped_val)
long do_pread(uint32_t arg1, void * arg2, size_t arg3, off_t arg4)
{
- DPRINTF("0x%x, %p, 0x%lx, 0x%llx\n", arg1, arg2, arg3, arg4);
+ DPRINTF("0x%x, %p, 0x%lx, 0x%" PRIx64 "\n", arg1, arg2, arg3, arg4);
long ret = pread(arg1, arg2, arg3, arg4);
return ret;
}
"clocking_mode = %d\n"
"clock_sel = %d %d\n"
"dots = %d\n"
- "ticks/char = %lld\n"
+ "ticks/char = %" PRId64 "\n"
"\n",
(double) get_ticks_per_sec() / (r->ticks_per_char * r->total_chars),
htotal_chars,
goto fail;
}
if (~net->dev.features & net->dev.backend_features) {
- fprintf(stderr, "vhost lacks feature mask %llu for backend\n",
+ fprintf(stderr, "vhost lacks feature mask %" PRIu64 " for backend\n",
~net->dev.features & net->dev.backend_features);
vhost_dev_cleanup(&net->dev);
goto fail;
if (str)
(*info->fprintf_func) (info->stream, "%s", str);
else if (odesc->flags & IA64_OPND_FLAG_DECIMAL_SIGNED)
- (*info->fprintf_func) (info->stream, "%lld", (long long) value);
+ (*info->fprintf_func) (info->stream, "%" PRId64,
+ (int64_t) value);
else if (odesc->flags & IA64_OPND_FLAG_DECIMAL_UNSIGNED)
- (*info->fprintf_func) (info->stream, "%llu", (long long) value);
+ (*info->fprintf_func) (info->stream, "%" PRIu64,
+ (uint64_t) value);
else
- (*info->fprintf_func) (info->stream, "0x%llx", (long long) value);
+ (*info->fprintf_func) (info->stream, "0x%" PRIx64,
+ (uint64_t) value);
break;
case IA64_OPND_CLASS_REL:
return -1;
}
- TRACE("Setting size to %llu block(s)",
- (unsigned long long)(size / blocksize));
+ TRACE("Setting size to %zd block(s)", (size_t)(size / blocksize));
if (ioctl(fd, NBD_SET_SIZE_BLOCKS, size / blocksize) == -1) {
int serrno = errno;
bs_offset += bs_sectors;
bdrv_get_geometry(bs[bs_i], &bs_sectors);
bs_num = 0;
- /* printf("changing part: sector_num=%lld, "
- "bs_i=%d, bs_offset=%lld, bs_sectors=%lld\n",
- sector_num, bs_i, bs_offset, bs_sectors); */
+ /* printf("changing part: sector_num=%" PRId64 ", "
+ "bs_i=%d, bs_offset=%" PRId64 ", bs_sectors=%" PRId64
+ "\n", sector_num, bs_i, bs_offset, bs_sectors); */
}
assert (bs_num < bs_sectors);
assert (bs_i < bs_n);
bs_offset += bs_sectors;
bdrv_get_geometry(bs[bs_i], &bs_sectors);
- /* printf("changing part: sector_num=%lld, bs_i=%d, "
- "bs_offset=%lld, bs_sectors=%lld\n",
+ /* printf("changing part: sector_num=%" PRId64 ", bs_i=%d, "
+ "bs_offset=%" PRId64 ", bs_sectors=%" PRId64 "\n",
sector_num, bs_i, bs_offset, bs_sectors); */
}
for (i = 0, p = buffer; i < len; i += 16) {
const uint8_t *s = p;
- printf("%08llx: ", (unsigned long long)offset + i);
+ printf("%08" PRIx64 ": ", offset + i);
for (j = 0; j < 16 && i + j < len; j++, p++)
printf("%02x ", *p);
printf(" ");
if (!Cflag) {
cvtstr((double)total, s1, sizeof(s1));
cvtstr(tdiv((double)total, *t), s2, sizeof(s2));
- printf("%s %d/%d bytes at offset %lld\n",
- op, total, count, (long long)offset);
+ printf("%s %d/%d bytes at offset %" PRId64 "\n",
+ op, total, count, offset);
printf("%s, %d ops; %s (%s/sec and %.4f ops/sec)\n",
s1, cnt, ts, s2, tdiv((double)cnt, *t));
} else {/* bytes,ops,time,bytes/sec,ops/sec */
for (i = 0; i < nr_iov; i++) {
char *arg = argv[i];
- long long len;
+ uint64_t len;
len = cvtnum(arg);
if (len < 0) {
}
if (len & 0x1ff) {
- printf("length argument %lld is not sector aligned\n",
- len);
+ printf("length argument %" PRId64
+ " is not sector aligned\n", len);
goto fail;
}
if (!pflag)
if (offset & 0x1ff) {
- printf("offset %lld is not sector aligned\n",
- (long long)offset);
+ printf("offset %" PRId64 " is not sector aligned\n",
+ offset);
return 0;
if (count & 0x1ff) {
void* cmp_buf = malloc(pattern_count);
memset(cmp_buf, pattern, pattern_count);
if (memcmp(buf + pattern_offset, cmp_buf, pattern_count)) {
- printf("Pattern verification failed at offset %lld, "
- "%d bytes\n",
- (long long) offset + pattern_offset, pattern_count);
+ printf("Pattern verification failed at offset %"
+ PRId64 ", %d bytes\n",
+ offset + pattern_offset, pattern_count);
}
free(cmp_buf);
}
optind++;
if (offset & 0x1ff) {
- printf("offset %lld is not sector aligned\n",
- (long long)offset);
+ printf("offset %" PRId64 " is not sector aligned\n",
+ offset);
return 0;
}
void* cmp_buf = malloc(qiov.size);
memset(cmp_buf, pattern, qiov.size);
if (memcmp(buf, cmp_buf, qiov.size)) {
- printf("Pattern verification failed at offset %lld, "
- "%zd bytes\n",
- (long long) offset, qiov.size);
+ printf("Pattern verification failed at offset %"
+ PRId64 ", %zd bytes\n",
+ offset, qiov.size);
}
free(cmp_buf);
}
if (!pflag) {
if (offset & 0x1ff) {
- printf("offset %lld is not sector aligned\n",
- (long long)offset);
+ printf("offset %" PRId64 " is not sector aligned\n",
+ offset);
return 0;
}
optind++;
if (offset & 0x1ff) {
- printf("offset %lld is not sector aligned\n",
- (long long)offset);
+ printf("offset %" PRId64 " is not sector aligned\n",
+ offset);
return 0;
}
memset(cmp_buf, ctx->pattern, ctx->qiov.size);
if (memcmp(ctx->buf, cmp_buf, ctx->qiov.size)) {
- printf("Pattern verification failed at offset %lld, "
- "%zd bytes\n",
- (long long) ctx->offset, ctx->qiov.size);
+ printf("Pattern verification failed at offset %"
+ PRId64 ", %zd bytes\n",
+ ctx->offset, ctx->qiov.size);
}
free(cmp_buf);
}
optind++;
if (ctx->offset & 0x1ff) {
- printf("offset %lld is not sector aligned\n",
- (long long)ctx->offset);
+ printf("offset %" PRId64 " is not sector aligned\n",
+ ctx->offset);
free(ctx);
return 0;
}
optind++;
if (ctx->offset & 0x1ff) {
- printf("offset %lld is not sector aligned\n",
- (long long)ctx->offset);
+ printf("offset %" PRId64 " is not sector aligned\n",
+ ctx->offset);
free(ctx);
return 0;
}
offset = cvtnum(argv[1]);
if (offset & 0x1ff) {
- printf("offset %lld is not sector aligned\n",
- (long long)offset);
+ printf("offset %" PRId64 " is not sector aligned\n",
+ offset);
return 0;
}
if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
qemu_log(
- "srch=%d pc=%x %x flg=%llx bt=%x ds=%u ccs=%x\n"
+ "srch=%d pc=%x %x flg=%" PRIx64 " bt=%x ds=%u ccs=%x\n"
"pid=%x usp=%x\n"
"%x.%x.%x.%x\n"
"%x.%x.%x.%x\n"
"%x.%x.%x.%x\n"
"%x.%x.%x.%x\n",
search_pc, dc->pc, dc->ppc,
- (unsigned long long)tb->flags,
+ (uint64_t)tb->flags,
env->btarget, (unsigned)tb->flags & 7,
env->pregs[PR_CCS],
env->pregs[PR_PID], env->pregs[PR_USP],
if (handler->count == 0)
continue;
cpu_fprintf(f, "%02x %02x %02x (%02x %04d) %16s: "
- "%016llx %lld\n",
+ "%016" PRIx64 " %" PRId64 "\n",
op1, op2, op3, op1, (op3 << 5) | op2,
handler->oname,
handler->count, handler->count);
if (handler->count == 0)
continue;
cpu_fprintf(f, "%02x %02x (%02x %04d) %16s: "
- "%016llx %lld\n",
+ "%016" PRIx64 " %" PRId64 "\n",
op1, op2, op1, op2, handler->oname,
handler->count, handler->count);
}
} else {
if (handler->count == 0)
continue;
- cpu_fprintf(f, "%02x (%02x ) %16s: %016llx %lld\n",
+ cpu_fprintf(f, "%02x (%02x ) %16s: %016" PRIx64
+ " %" PRId64 "\n",
op1, op1, handler->oname,
handler->count, handler->count);
}
char *featurestr, *name = strtok(s, ",");
uint32_t plus_features = 0;
uint32_t minus_features = 0;
- long long iu_version;
+ uint64_t iu_version;
uint32_t fpu_version, mmu_version, nwindows;
for (i = 0; i < ARRAY_SIZE(sparc_defs); i++) {
}
cpu_def->iu_version = iu_version;
#ifdef DEBUG_FEATURES
- fprintf(stderr, "iu_version %llx\n", iu_version);
+ fprintf(stderr, "iu_version %" PRIx64 "\n", iu_version);
#endif
} else if (!strcmp(featurestr, "fpu_version")) {
char *err;