]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - write.c
sched: Rename task->status to task->name.
[paraslash.git] / write.c
diff --git a/write.c b/write.c
index 15bbb4a6399dd0739b41d3ee6c7b73e4c6af5fbc..440778407b3c8388e278a0cd79f505fe016c28ce 100644 (file)
--- a/write.c
+++ b/write.c
@@ -123,16 +123,17 @@ static int setup_and_schedule(void)
        s.default_timeout.tv_usec = 50000;
        ret = schedule(&s);
        if (ret >= 0) {
-               int j;
+               int j, ts;
                for (j = 0; j < i; j++) {
-                       struct task *t = wns[j].task;
-                       assert(t->error < 0);
-                       if (t->error != -E_WRITE_COMMON_EOF
-                                       && t->error != -E_BTR_EOF) {
-                               PARA_ERROR_LOG("%s: %s\n", t->status,
-                                       para_strerror(-t->error));
+                       struct writer_node *wn = wns + j;
+                       ts = task_status(wn->task);
+                       assert(ts < 0);
+                       if (ts != -E_WRITE_COMMON_EOF && ts != -E_BTR_EOF) {
+                               const char *name = writer_names[wn->writer_num];
+                               PARA_ERROR_LOG("%s: %s\n", name,
+                                       para_strerror(-ts));
                                if (ret >= 0)
-                                       ret = t->error;
+                                       ret = ts;
                        }
                }
        }