blob: 5d9c26489aab66a2222d672d415b654f8d932918 [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;
Simon Glassc1c4a8f2020-05-10 11:39:57 -060015static struct disk_partition *part_info;
wdenk4d01d9e2004-03-25 14:59:05 +000016
17
Simon Glassc1c4a8f2020-05-10 11:39:57 -060018void reiserfs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *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}