From 8032150f3e437f2c204a46a8d1b217f6f95b50c8 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Wed, 30 Sep 2020 10:44:50 +0200 Subject: [PATCH] main: report disk-error --- kernel/sy_old/mars_main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/kernel/sy_old/mars_main.c b/kernel/sy_old/mars_main.c index 3b9c791a..b1fee140 100644 --- a/kernel/sy_old/mars_main.c +++ b/kernel/sy_old/mars_main.c @@ -5165,6 +5165,18 @@ int make_bio(struct mars_dent *dent) goto done; } brick->outputs[0]->output_name = dent->d_path; + if (brick->type == (void *)&bio_brick_type) + __show_actual(rot->parent_path, + "disk-error", + ((struct bio_brick *)brick)->error); + else if (brick->type == (void *)&aio_brick_type && brick->outputs[0]) + __show_actual(rot->parent_path, + "disk-error", + ((struct aio_brick *)brick)->outputs[0]->error); + else if (brick->type == (void *)&sio_brick_type && brick->outputs[0]) + __show_actual(rot->parent_path, + "disk-error", + ((struct sio_brick *)brick)->outputs[0]->error); /* Report the actual size of the device. * It may be larger than the global size.