]> Zhao Yanbai Git Server - minix.git/commitdiff
Block drivers: reply ENOTTY to unknown IOCTLs 61/961/2
authorDavid van Moolenbroek <david@minix3.org>
Sun, 1 Sep 2013 12:34:17 +0000 (14:34 +0200)
committerLionel Sambuc <lionel@minix3.org>
Wed, 19 Feb 2014 10:22:15 +0000 (11:22 +0100)
Change-Id: Ie2e82d2491d546f4dd73b009100646e249a147b5

drivers/ahci/ahci.c
drivers/at_wini/at_wini.c
drivers/cat24c256/cat24c256.c
drivers/filter/main.c
drivers/mmc/mmcblk.c
drivers/tda19988/tda19988.c
drivers/virtio_blk/virtio_blk.c
lib/libblockdriver/driver.c

index 1c7282622d17b17e043b9a3dbb76c39bb1a1a0ac..0c108e42a07ff91f7b9d3d23544b5868481bbcd4 100644 (file)
@@ -2685,7 +2685,7 @@ static int ahci_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
                        sizeof(val));
        }
 
-       return EINVAL;
+       return ENOTTY;
 }
 
 /*===========================================================================*
index 00943acc1a24291007c89bc4a6eb3ce59f5d44b9..349ffeb91e023231236a34c7d72bad78d4a703ce 100644 (file)
@@ -2290,7 +2290,7 @@ static int w_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
                return (w_wn->w_status & (STATUS_ERR|STATUS_WF)) ? EIO : OK;
        }
 
-       return EINVAL;
+       return ENOTTY;
 }
 
 /*===========================================================================*
index b52cb73a80e8bb960126f94cc900a9b1e78f4c00..ba5d4b44b6a42ff5228ef4d12f8db99b49aa7776 100644 (file)
@@ -219,7 +219,7 @@ cat24c256_blk_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
 {
        log_trace(&log, "cat24c256_blk_ioctl(%d)\n", minor);
        /* no supported ioctls for this device */
-       return EINVAL;
+       return ENOTTY;
 }
 
 static struct device *
index b825ed31c26507fddd65e6ef2fa7a507651a685a..742a543fa8b575f09f6942982836c7dba7015903 100644 (file)
@@ -269,7 +269,7 @@ static int do_ioctl(message *m)
        default:
                printf("Filter: unknown ioctl request: %d!\n",
                        m->BDEV_REQUEST);
-               return EINVAL;
+               return ENOTTY;
        }
 
        return OK;
index 9664408be602fa044272d83131dfaf31180e886f..c401439954ad19bbdd44de66cf457f542f85b749 100644 (file)
@@ -469,7 +469,7 @@ block_ioctl(dev_t minor,
                return OK;
        }
 
-       return EINVAL;
+       return ENOTTY;
 }
 
 /*===========================================================================*
index c8bbeff9ad7d571affd3de91179a067ac46bcd58..c02c3694638d4210d82b5be4e32e94776523f028 100644 (file)
@@ -178,7 +178,7 @@ struct blockdriver tda19988_tab = {
        .bdr_open = tda19988_blk_open,
        .bdr_close = tda19988_blk_close,
        .bdr_transfer = tda19988_blk_transfer,
-       .bdr_ioctl = tda19988_blk_ioctl,        /* nop -- always returns EINVAL */
+       .bdr_ioctl = tda19988_blk_ioctl,        /* nop -- always returns ENOTTY */
        .bdr_cleanup = NULL,    /* nothing allocated -- nothing to clean up */
        .bdr_part = tda19988_blk_part,
        .bdr_geometry = NULL,   /* no geometry (cylinders, heads, sectors, etc) */
@@ -324,7 +324,7 @@ tda19988_blk_ioctl(dev_t minor, unsigned int request, endpoint_t endpt,
 {
        log_trace(&log, "tda19988_blk_ioctl(%d)\n", minor);
        /* no supported ioctls for this device */
-       return EINVAL;
+       return ENOTTY;
 }
 
 static struct device *
index 1415524387a370ace6d7244d45176ca68af1b779..a4ce7e17611df10024bd00d113afd6f90ea068a4 100644 (file)
@@ -390,7 +390,7 @@ virtio_blk_ioctl(dev_t minor, unsigned int req, endpoint_t endpt,
 
        }
 
-       return EINVAL;
+       return ENOTTY;
 }
 
 static struct device *
index f45b11552ebc9a33162ca4584264798d4d49921b..eb3f479c832596930913ff592424cde7a9bf6a86 100644 (file)
@@ -345,7 +345,7 @@ static int do_ioctl(struct blockdriver *bdp, message *mp)
        if (bdp->bdr_ioctl)
                r = (*bdp->bdr_ioctl)(minor, request, mp->m_source, grant);
        else
-               r = EINVAL;
+               r = ENOTTY;
   }
 
   return r;