From 945bacdef5dc80a538061dd5599453f4191f4a23 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Thu, 21 Mar 2024 12:10:51 +0100 Subject: [PATCH] btrfs-progs: convert missing device printf() to a warning() To support JSON formatted output for `filesystem show` stdout can't contain warnings, the warning macro prints to stderr. --- kernel-shared/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel-shared/volumes.c b/kernel-shared/volumes.c index b21231efe8..93336841c5 100644 --- a/kernel-shared/volumes.c +++ b/kernel-shared/volumes.c @@ -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);