summaryrefslogtreecommitdiff
path: root/libdde_linux26/lib
diff options
context:
space:
mode:
authorZheng Da <zhengda1936@gmail.com>2010-08-08 08:10:25 +0200
committerZheng Da <zhengda1936@gmail.com>2010-08-08 08:10:25 +0200
commit793af51f505adfa1ea138dc76be731faab58b1a6 (patch)
tree1bae3b7bfc003c7893e8b0504a1c0e4394924536 /libdde_linux26/lib
parente30a817d6d2a1d71223caa238781a76104a54840 (diff)
implement device_read for block devices.
Diffstat (limited to 'libdde_linux26/lib')
-rw-r--r--libdde_linux26/lib/src/mach_glue/block.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdde_linux26/lib/src/mach_glue/block.c b/libdde_linux26/lib/src/mach_glue/block.c
index a856cc9b..ea44d87f 100644
--- a/libdde_linux26/lib/src/mach_glue/block.c
+++ b/libdde_linux26/lib/src/mach_glue/block.c
@@ -20,8 +20,8 @@ struct block_device *open_block_dev (char *name, int part, fmode_t mode)
/* write a piece of data to a block device.
* DATA must be in one page.
* SECTORNR: the writing location in sectors. */
-int block_dev_write (struct block_device *dev, int sectornr,
- char *data, int count, void (*write_done (int err)))
+int block_dev_rw (struct block_device *dev, int sectornr,
+ char *data, int count, int rw, void (*write_done (int err)))
{
int err = 0;
struct bio *bio;
@@ -63,7 +63,7 @@ int block_dev_write (struct block_device *dev, int sectornr,
bio->bi_end_io = end_bio;
bio->bi_private = NULL;
bio_get (bio);
- submit_bio (WRITE, bio);
+ submit_bio (rw, bio);
if (bio_flagged (bio, BIO_EOPNOTSUPP))
{
err = -EOPNOTSUPP;