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