1N/A/*
1N/A libparted - a library for manipulating disk partitions
1N/A Copyright (C) 2004, 2007, 2009-2010 Free Software Foundation, Inc.
1N/A
1N/A This program is free software; you can redistribute it and/or modify
1N/A it under the terms of the GNU General Public License as published by
1N/A the Free Software Foundation; either version 3 of the License, or
1N/A (at your option) any later version.
1N/A
1N/A This program is distributed in the hope that it will be useful,
1N/A but WITHOUT ANY WARRANTY; without even the implied warranty of
1N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1N/A GNU General Public License for more details.
1N/A
1N/A You should have received a copy of the GNU General Public License
1N/A along with this program. If not, see <http://www.gnu.org/licenses/>.
1N/A*/
1N/A
1N/A#ifndef _FILE_PLUS_H
1N/A#define _FILE_PLUS_H
1N/A
1N/A#include <parted/parted.h>
1N/A#include <parted/endian.h>
1N/A#include <parted/debug.h>
1N/A
1N/A#include "hfs.h"
1N/A
1N/AHfsPPrivateFile*
1N/Ahfsplus_file_open (PedFileSystem *fs, HfsPNodeID CNID,
1N/A HfsPExtDataRec ext_desc, PedSector sect_nb);
1N/A
1N/Avoid
1N/Ahfsplus_file_close (HfsPPrivateFile* file);
1N/A
1N/Aint
1N/Ahfsplus_file_read(HfsPPrivateFile* file, void *buf,
1N/A PedSector sector, unsigned int nb);
1N/A
1N/Aint
1N/Ahfsplus_file_write(HfsPPrivateFile* file, void *buf,
1N/A PedSector sector, unsigned int nb);
1N/A
1N/A/* Read the nth sector of a file */
1N/A/* return 0 on error */
1N/Astatic __inline__ int
1N/Ahfsplus_file_read_sector (HfsPPrivateFile* file, void *buf, PedSector sector)
1N/A{
1N/A return hfsplus_file_read(file, buf, sector, 1);
1N/A}
1N/A
1N/A/* Write the nth sector of a file */
1N/A/* return 0 on error */
1N/Astatic __inline__ int
1N/Ahfsplus_file_write_sector (HfsPPrivateFile* file, void *buf, PedSector sector)
1N/A{
1N/A return hfsplus_file_write(file, buf, sector, 1);
1N/A}
1N/A
1N/A
1N/A#endif /* _FILE_PLUS_H */