refactor: more compact log message
[lunaix-os.git] / lunaix-os / kernel / block / block.c
index 216c0ef79a1eb7ea3e1be549c3dbc1646701dcb5..dbdb95a52c145fbed4f0d04e74c686c3f846ac71 100644 (file)
@@ -75,10 +75,6 @@ __block_read(struct device* dev, void* buf, size_t offset, size_t len)
 
     pwait(&req->wait);
 
-    // XXX temporary work-around
-    //      in case pwait used in proc0. Need a dummy process!
-    wait_if((req->flags & BLKIO_PENDING));
-
     if (!(errno = req->errcode)) {
         memcpy(buf, tmp_buf + r, rd_size);
         errno = len;
@@ -125,10 +121,6 @@ __block_write(struct device* dev, void* buf, size_t offset, size_t len)
 
     pwait(&req->wait);
 
-    // XXX temporary work-around
-    //      in case pwait used in proc0. Need a dummy process!
-    wait_if((req->flags & BLKIO_PENDING));
-
     int errno = req->errcode;
     if (!errno) {
         errno = len;
@@ -172,7 +164,7 @@ block_mount(struct block_dev* bdev, devfs_exporter fs_export)
 
     errno = blkpart_probegpt(bdev->dev);
     if (errno < 0) {
-        kprintf(KERROR "Corrupted partition table. (%d)", errno);
+        kprintf(KERROR "Fail to parse partition table (%d)\n", errno);
     } else if (!errno) {
         // TODO try other PT parser...
     }