diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-06-25 00:19:40 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-06-25 00:19:40 +0200 |
commit | 38a058ad3e5b0ff21fa6d12ce9d29af70a0db826 (patch) | |
tree | 60a95e1deb7e1932f444f9846588c6381e30f740 /linux | |
parent | 7987a711e8f13c0543e87a0211981f4b40ef6d94 (diff) |
Route BLKRRPART to partitions layer
* linux/dev/glue/block.c (device_set_status): New function
(linux_block_emulation_ops): Set set_status field to device_set_status.
Diffstat (limited to 'linux')
-rw-r--r-- | linux/dev/glue/block.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c index 36aac79..b920fb6 100644 --- a/linux/dev/glue/block.c +++ b/linux/dev/glue/block.c @@ -1704,6 +1704,25 @@ device_get_status (void *d, dev_flavor_t flavor, dev_status_t status, return D_SUCCESS; } +static io_return_t +device_set_status (void *d, dev_flavor_t flavor, dev_status_t status, + mach_msg_type_number_t *status_count) +{ + struct block_data *bd = d; + + switch (flavor) + { + case BLKRRPART: + { + DECL_DATA; + INIT_DATA(); + return (*bd->ds->fops->ioctl) (&td.inode, &td.file, flavor, 0); + } + } + + return D_INVALID_OPERATION; +} + struct device_emulation_ops linux_block_emulation_ops = { NULL, @@ -1715,7 +1734,7 @@ struct device_emulation_ops linux_block_emulation_ops = NULL, device_read, NULL, - NULL, + device_set_status, device_get_status, NULL, NULL, |