Skip to content

Commit b1f374d

Browse files
committed
btrfs-progs: switch %Lu to %llu format
The %Lu format is not standard and we use %llu everywhere else, so switch the remaining cases. Signed-off-by: David Sterba <dsterba@suse.com>
1 parent ab0d369 commit b1f374d

File tree

11 files changed

+23
-23
lines changed

11 files changed

+23
-23
lines changed

btrfs-corrupt-block.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ static int corrupt_inode(struct btrfs_trans_handle *trans,
596596
goto out;
597597
if (ret) {
598598
if (!path->slots[0]) {
599-
fprintf(stderr, "Couldn't find inode %Lu\n", inode);
599+
fprintf(stderr, "Couldn't find inode %llu\n", inode);
600600
ret = -ENOENT;
601601
goto out;
602602
}
@@ -606,7 +606,7 @@ static int corrupt_inode(struct btrfs_trans_handle *trans,
606606

607607
btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
608608
if (key.objectid != inode) {
609-
fprintf(stderr, "Couldn't find inode %Lu\n", inode);
609+
fprintf(stderr, "Couldn't find inode %llu\n", inode);
610610
ret = -ENOENT;
611611
goto out;
612612
}

btrfs-map-logical.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static int __print_mapping_info(struct btrfs_fs_info *fs_info, u64 logical,
122122
for (i = 0; i < multi->num_stripes; i++) {
123123
device = multi->stripes[i].dev;
124124
fprintf(info_file,
125-
"mirror %d logical %Lu physical %Lu device %s\n",
125+
"mirror %d logical %llu physical %llu device %s\n",
126126
mirror_num, logical + cur_offset,
127127
multi->stripes[0].physical,
128128
device->name);

cmds/inspect-tree-stats.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static void print_seek_histogram(struct root_stats *stat)
256256
if (group_count) {
257257

258258
gticks = group_count / tick_interval;
259-
printf("\t\t%*Lu - %*Lu: %*Lu ", digits, group_start,
259+
printf("\t\t%*llu - %*llu: %*llu ", digits, group_start,
260260
digits, group_end, digits, group_count);
261261
if (gticks) {
262262
for (i = 0; i < gticks; i++)
@@ -271,7 +271,7 @@ static void print_seek_histogram(struct root_stats *stat)
271271
if (ticks <= 2)
272272
continue;
273273

274-
printf("\t\t%*Lu - %*Lu: %*Lu ", digits, seek->distance,
274+
printf("\t\t%*llu - %*llu: %*llu ", digits, seek->distance,
275275
digits, seek->distance, digits, seek->count);
276276
for (i = 0; i < ticks; i++)
277277
printf("#");
@@ -281,7 +281,7 @@ static void print_seek_histogram(struct root_stats *stat)
281281
u64 gticks;
282282

283283
gticks = group_count / tick_interval;
284-
printf("\t\t%*Lu - %*Lu: %*Lu ", digits, group_start,
284+
printf("\t\t%*llu - %*llu: %*llu ", digits, group_start,
285285
digits, group_end, digits, group_count);
286286
if (gticks) {
287287
for (i = 0; i < gticks; i++)

cmds/restore.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ static int copy_one_inline(struct btrfs_root *root, int fd,
334334
done = pwrite(fd, outbuf, ram_size, pos);
335335
free(outbuf);
336336
if (done < ram_size) {
337-
fprintf(stderr, "Short compressed inline write, wanted %Lu, "
337+
fprintf(stderr, "Short compressed inline write, wanted %llu, "
338338
"did %zd: %d\n", ram_size, done, errno);
339339
return -1;
340340
}
@@ -1023,7 +1023,7 @@ static int search_dir(struct btrfs_root *root, struct btrfs_key *key,
10231023
}
10241024
btrfs_item_key_to_cpu(leaf, &found_key, path.slots[0]);
10251025
if (found_key.objectid != key->objectid) {
1026-
pr_verbose(2, "Found objectid=%Lu, key=%llu\n",
1026+
pr_verbose(2, "Found objectid=%llu, key=%llu\n",
10271027
found_key.objectid, key->objectid);
10281028
break;
10291029
}
@@ -1245,7 +1245,7 @@ static int do_list_roots(struct btrfs_root *root)
12451245
read_extent_buffer(leaf, &ri, offset, sizeof(ri));
12461246
printf(" tree ");
12471247
btrfs_print_key(&disk_key);
1248-
printf(" %Lu level %d\n", btrfs_root_bytenr(&ri),
1248+
printf(" %llu level %d\n", btrfs_root_bytenr(&ri),
12491249
btrfs_root_level(&ri));
12501250
path.slots[0]++;
12511251
}
@@ -1357,7 +1357,7 @@ static int find_first_dir(struct btrfs_root *root, u64 *objectid)
13571357
if (found_key.type != key.type)
13581358
continue;
13591359

1360-
printf("Using objectid %Lu for first dir\n",
1360+
printf("Using objectid %llu for first dir\n",
13611361
found_key.objectid);
13621362
*objectid = found_key.objectid;
13631363
ret = 0;

convert/source-ext2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ static int ext2_copy_single_xattr(struct btrfs_trans_handle *trans,
529529
strncat(namebuf, EXT2_EXT_ATTR_NAME(entry), entry->e_name_len);
530530
if (name_len + datalen > BTRFS_LEAF_DATA_SIZE(root->fs_info) -
531531
sizeof(struct btrfs_item) - sizeof(struct btrfs_dir_item)) {
532-
fprintf(stderr, "skip large xattr on inode %Lu name %.*s\n",
532+
fprintf(stderr, "skip large xattr on inode %llu name %.*s\n",
533533
objectid - INO_OFFSET, name_len, namebuf);
534534
goto out;
535535
}

kernel-shared/ctree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ int btrfs_cow_block(struct btrfs_trans_handle *trans,
501501
int ret;
502502
/*
503503
if (trans->transaction != root->fs_info->running_transaction) {
504-
printk(KERN_CRIT "trans %Lu running %Lu\n", trans->transid,
504+
printk(KERN_CRIT "trans %llu running %llu\n", trans->transid,
505505
root->fs_info->running_transaction->transid);
506506
WARN_ON(1);
507507
}

kernel-shared/disk-io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ int read_whole_eb(struct btrfs_fs_info *info, struct extent_buffer *eb, int mirr
316316
ret = btrfs_map_block(info, READ, eb->start + offset,
317317
&read_len, &multi, mirror, NULL);
318318
if (ret) {
319-
printk("Couldn't map the block %Lu\n", eb->start + offset);
319+
printk("Couldn't map the block %llu\n", eb->start + offset);
320320
kfree(multi);
321321
return -EIO;
322322
}

kernel-shared/extent-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ int btrfs_set_block_flags(struct btrfs_trans_handle *trans, u64 bytenr,
14211421

14221422
if (ret != 0) {
14231423
btrfs_print_leaf(path->nodes[0], BTRFS_PRINT_TREE_DEFAULT);
1424-
printk("failed to find block number %Lu\n",
1424+
printk("failed to find block number %llu\n",
14251425
(unsigned long long)bytenr);
14261426
BUG();
14271427
}

kernel-shared/extent_io.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ int read_data_from_disk(struct btrfs_fs_info *info, void *buf, u64 offset,
836836
ret = btrfs_map_block(info, READ, offset, &read_len, &multi,
837837
mirror, NULL);
838838
if (ret) {
839-
fprintf(stderr, "Couldn't map the block %Lu\n",
839+
fprintf(stderr, "Couldn't map the block %llu\n",
840840
offset);
841841
return -EIO;
842842
}
@@ -852,13 +852,13 @@ int read_data_from_disk(struct btrfs_fs_info *info, void *buf, u64 offset,
852852
multi->stripes[0].physical);
853853
kfree(multi);
854854
if (ret < 0) {
855-
fprintf(stderr, "Error reading %Lu, %d\n", offset,
855+
fprintf(stderr, "Error reading %llu, %d\n", offset,
856856
ret);
857857
return ret;
858858
}
859859
if (ret != read_len) {
860-
fprintf(stderr, "Short read for %Lu, read %d, "
861-
"read_len %Lu\n", offset, ret, read_len);
860+
fprintf(stderr, "Short read for %llu, read %d, "
861+
"read_len %llu\n", offset, ret, read_len);
862862
return -EIO;
863863
}
864864

@@ -890,7 +890,7 @@ int write_data_to_disk(struct btrfs_fs_info *info, void *buf, u64 offset,
890890
ret = btrfs_map_block(info, WRITE, offset, &this_len, &multi,
891891
mirror, &raid_map);
892892
if (ret) {
893-
fprintf(stderr, "Couldn't map the block %Lu\n",
893+
fprintf(stderr, "Couldn't map the block %llu\n",
894894
offset);
895895
return -EIO;
896896
}

kernel-shared/free-space-cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int io_ctl_prepare_pages(struct io_ctl *io_ctl, struct btrfs_root *root,
112112
if (ret) {
113113
fprintf(stderr,
114114
"Couldn't find file extent item for free space inode"
115-
" %Lu\n", ino);
115+
" %llu\n", ino);
116116
btrfs_release_path(path);
117117
return -EINVAL;
118118
}
@@ -183,7 +183,7 @@ static int io_ctl_check_generation(struct io_ctl *io_ctl, u64 generation)
183183
gen = io_ctl->cur;
184184
if (le64_to_cpu(*gen) != generation) {
185185
printk("btrfs: space cache generation "
186-
"(%Lu) does not match inode (%Lu)\n", *gen,
186+
"(%llu) does not match inode (%llu)\n", *gen,
187187
generation);
188188
io_ctl_unmap_page(io_ctl);
189189
return -EIO;

0 commit comments

Comments
 (0)