2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2004-03-25 14:59:05 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2003 - 2004
|
|
|
|
* Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <config.h>
|
|
|
|
#include <reiserfs.h>
|
2017-09-03 15:00:24 +00:00
|
|
|
#include <fs_internal.h>
|
2004-03-25 14:59:05 +00:00
|
|
|
#include "reiserfs_private.h"
|
|
|
|
|
2016-02-29 22:25:34 +00:00
|
|
|
static struct blk_desc *reiserfs_blk_desc;
|
2020-05-10 17:39:57 +00:00
|
|
|
static struct disk_partition *part_info;
|
2004-03-25 14:59:05 +00:00
|
|
|
|
|
|
|
|
2020-05-10 17:39:57 +00:00
|
|
|
void reiserfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info)
|
2004-03-25 14:59:05 +00:00
|
|
|
{
|
2016-02-29 22:25:34 +00:00
|
|
|
reiserfs_blk_desc = rbdd;
|
2012-08-23 11:31:50 +00:00
|
|
|
part_info = info;
|
2004-03-25 14:59:05 +00:00
|
|
|
}
|
|
|
|
|
2017-09-03 15:00:24 +00:00
|
|
|
int reiserfs_devread(int sector, int byte_offset, int byte_len, char *buf)
|
2004-03-25 14:59:05 +00:00
|
|
|
{
|
2017-09-03 15:00:24 +00:00
|
|
|
return fs_devread(reiserfs_blk_desc, part_info, sector, byte_offset,
|
|
|
|
byte_len, buf);
|
2004-03-25 14:59:05 +00:00
|
|
|
}
|