diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-06-12 08:08:04 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-06-12 08:08:04 -0400 |
commit | 38ef945266758856bf11e385eadaa0872b6d8b30 (patch) | |
tree | d33ea2dd8fb941806351f3567fa981f718f95d1b /random-test.c | |
parent | b53a236c3eea3ce01a0054c249cb0b974b9568c6 (diff) | |
download | btrfs-progs-38ef945266758856bf11e385eadaa0872b6d8b30.tar.gz |
printf cleanups
Diffstat (limited to 'random-test.c')
-rw-r--r-- | random-test.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/random-test.c b/random-test.c index 90fca13..07e71f2 100644 --- a/random-test.c +++ b/random-test.c @@ -48,7 +48,7 @@ static int ins_one(struct btrfs_trans_handle *trans, struct btrfs_root *root, unsigned long oid; btrfs_init_path(&path); ret = setup_key(radix, &key, 0); - sprintf(buf, "str-%Lu\n", key.objectid); + sprintf(buf, "str-%llu\n", (unsigned long long)key.objectid); ret = btrfs_insert_item(trans, root, &key, buf, strlen(buf)); if (ret) goto error; @@ -60,7 +60,7 @@ static int ins_one(struct btrfs_trans_handle *trans, struct btrfs_root *root, goto error; return ret; error: - printf("failed to insert %Lu\n", key.objectid); + printf("failed to insert %llu\n", (unsigned long long)key.objectid); return -1; } @@ -75,10 +75,11 @@ static int insert_dup(struct btrfs_trans_handle *trans, struct btrfs_root ret = setup_key(radix, &key, 1); if (ret < 0) return 0; - sprintf(buf, "str-%Lu\n", key.objectid); + sprintf(buf, "str-%llu\n", (unsigned long long)key.objectid); ret = btrfs_insert_item(trans, root, &key, buf, strlen(buf)); if (ret != -EEXIST) { - printf("insert on %Lu gave us %d\n", key.objectid, ret); + printf("insert on %llu gave us %d\n", + (unsigned long long)key.objectid, ret); return 1; } return 0; @@ -107,7 +108,7 @@ static int del_one(struct btrfs_trans_handle *trans, struct btrfs_root *root, goto error; return 0; error: - printf("failed to delete %Lu\n", key.objectid); + printf("failed to delete %llu\n", (unsigned long long)key.objectid); return -1; } @@ -127,7 +128,7 @@ static int lookup_item(struct btrfs_trans_handle *trans, struct btrfs_root goto error; return 0; error: - printf("unable to find key %Lu\n", key.objectid); + printf("unable to find key %llu\n", (unsigned long long)key.objectid); return -1; } @@ -147,7 +148,8 @@ static int lookup_enoent(struct btrfs_trans_handle *trans, struct btrfs_root goto error; return 0; error: - printf("able to find key that should not exist %Lu\n", key.objectid); + printf("able to find key that should not exist %llu\n", + (unsigned long long)key.objectid); return -1; } |