Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use %llu and %lld macros for 64b ints. #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions busexmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ static void *data;
static int xmp_read(void *buf, u_int32_t len, u_int64_t offset, void *userdata)
{
if (*(int *)userdata)
fprintf(stderr, "R - %lu, %u\n", offset, len);
fprintf(stderr, "R - %llu, %u\n", offset, len);
memcpy(buf, (char *)data + offset, len);
return 0;
}

static int xmp_write(const void *buf, u_int32_t len, u_int64_t offset, void *userdata)
{
if (*(int *)userdata)
fprintf(stderr, "W - %lu, %u\n", offset, len);
fprintf(stderr, "W - %llu, %u\n", offset, len);
memcpy((char *)data + offset, buf, len);
return 0;
}
Expand All @@ -60,7 +60,7 @@ static int xmp_flush(void *userdata)
static int xmp_trim(u_int64_t from, u_int32_t len, void *userdata)
{
if (*(int *)userdata)
fprintf(stderr, "T - %lu, %u\n", from, len);
fprintf(stderr, "T - %llu, %u\n", from, len);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ int main(int argc, char *argv[])
err = ioctl(fd, BLKGETSIZE64, &size);
assert(err != -1);
(void)err;
fprintf(stderr, "The size of this device is %ld bytes.\n", size);
fprintf(stderr, "The size of this device is %lld bytes.\n", size);
bop.size = size;

buse_main(argv[2], &bop, NULL);
Expand Down