Skip to content

Commit

Permalink
btrfs-progs: convert missing device printf() to a warning()
Browse files Browse the repository at this point in the history
To support JSON formatted output for `filesystem show` stdout can't
contain warnings, the warning macro prints to stderr.
  • Loading branch information
jelly committed Jun 5, 2024
1 parent 9d0c2b5 commit 945bacd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel-shared/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2434,7 +2434,7 @@ static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key,
NULL);
if (!map->stripes[i].dev) {
map->stripes[i].dev = fill_missing_device(devid, uuid);
printf("warning, device %llu is missing\n",
warning("warning, device %llu is missing\n",
(unsigned long long)devid);
list_add(&map->stripes[i].dev->dev_list,
&fs_info->fs_devices->devices);
Expand Down

0 comments on commit 945bacd

Please sign in to comment.