blob: c6b67795df5c44f93770064f9d8c7cc2551ce8e1 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
wdenk4d01d9e2004-03-25 14:59:05 +00002/*
3 * (C) Copyright 2003 - 2004
4 * Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com>
wdenk4d01d9e2004-03-25 14:59:05 +00005 */
6
7
8#include <common.h>
wdenk4d01d9e2004-03-25 14:59:05 +00009#include <config.h>
10#include <reiserfs.h>
Marek Behún45ebb952017-09-03 17:00:24 +020011#include <fs_internal.h>
wdenk4d01d9e2004-03-25 14:59:05 +000012#include "reiserfs_private.h"
13
Simon Glasse3394752016-02-29 15:25:34 -070014static struct blk_desc *reiserfs_blk_desc;
Rob Herring8d6ba052012-08-23 11:31:50 +000015static disk_partition_t *part_info;
wdenk4d01d9e2004-03-25 14:59:05 +000016
17
Simon Glasse3394752016-02-29 15:25:34 -070018void reiserfs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info)
wdenk4d01d9e2004-03-25 14:59:05 +000019{
Simon Glasse3394752016-02-29 15:25:34 -070020 reiserfs_blk_desc = rbdd;
Rob Herring8d6ba052012-08-23 11:31:50 +000021 part_info = info;
wdenk4d01d9e2004-03-25 14:59:05 +000022}
23
Marek Behún45ebb952017-09-03 17:00:24 +020024int reiserfs_devread(int sector, int byte_offset, int byte_len, char *buf)
wdenk4d01d9e2004-03-25 14:59:05 +000025{
Marek Behún45ebb952017-09-03 17:00:24 +020026 return fs_devread(reiserfs_blk_desc, part_info, sector, byte_offset,
27 byte_len, buf);
wdenk4d01d9e2004-03-25 14:59:05 +000028}