]> rtime.felk.cvut.cz Git - frescor/frsh.git/blobdiff - resources/disk_bfq/lib/diskbfq_fra.c
disk_bfq: Report ioprio() errors
[frescor/frsh.git] / resources / disk_bfq / lib / diskbfq_fra.c
index 1c3a7e51581987d0e20e715500c5cbfc4417ba5b..589a08de7f51c14c7dc21d2e5ff5cd4c48b4b062 100644 (file)
@@ -95,10 +95,10 @@ static int diskbfq_create_vres(fres_vres_t *vres, void *priv)
                return -1;
 
        memcpy(vres->priv, &disk_sched->ioprio, sizeof(int));
-       printf("Created BFQ VRES (ioprio=%d budget=%ld ms, period=%ld ms)\n",
-              disk_sched->ioprio,
-              fosa_rel_time_to_msec(basic->budget),
-              fosa_rel_time_to_msec(basic->period));
+       ul_logmsg("Created BFQ VRES (ioprio=%d budget=%ld ms, period=%ld ms)\n",
+                 disk_sched->ioprio,
+                 fosa_rel_time_to_msec(basic->budget),
+                 fosa_rel_time_to_msec(basic->period));
 
        return 0;
 }
@@ -118,7 +118,7 @@ static int diskbfq_cancel_vres(fres_vres_t *vres, void *priv)
         * is automatically released when the thread is unbound
         * from the vres itself.
         */
-       printf("Canceled DISK VRES (ioprio=%d)\n", *((int*)vres->priv));
+       ul_logmsg("Canceled DISK VRES (ioprio=%d)\n", *((int*)vres->priv));
        free(vres->priv);
 
        return 0;
@@ -135,8 +135,8 @@ int diskbfq_change_vres(fres_vres_t *vres, void *priv)
        }
 
        disk_sched = fres_contract_get_disk_sched(vres->new);
-       printf("Changed BFQ VRES from ioprio=%d to ioprio=%d\n",
-              *((int*)vres->priv), (int) disk_sched->ioprio);
+       ul_logmsg("Changed BFQ VRES from ioprio=%d to ioprio=%d\n",
+                 *((int*)vres->priv), (int) disk_sched->ioprio);
        memcpy(vres->priv, &disk_sched->ioprio, sizeof(int));
 
        return 0;
@@ -171,6 +171,7 @@ int fra_DISK_bind_thread
 
        return 0;
 err:
+       ul_logerr("ioprio(): %s\n", strerror(errno));
        return -1;
 }