1//---------------------------------------------------------------------- 2// This software is part of the OpenBeOS distribution and is covered 3// by the OpenBeOS license. 4// 5// Copyright (c) 2003 Tyler Dauwalder, tyler@dauwalder.net 6//--------------------------------------------------------------------- 7#ifndef _UDF_UTILS_H 8#define _UDF_UTILS_H 9 10/*! \file Utils.h 11 12 Miscellaneous Udf utility functions. 13*/ 14 15#ifndef _IMPEXP_KERNEL 16# define _IMPEXP_KERNEL 17#endif 18#ifdef COMPILE_FOR_R5 19extern "C" { 20#endif 21 #include "fsproto.h" 22#ifdef COMPILE_FOR_R5 23} 24#endif 25 26#include "UdfStructures.h" 27 28namespace Udf { 29 30long_address to_long_address(vnode_id id, uint32 length = 0); 31 32vnode_id to_vnode_id(long_address address); 33 34time_t make_time(timestamp ×tamp); 35 36status_t get_block_shift(uint32 blockSize, uint32 &blockShift); 37 38const char* bool_to_string(bool value); 39 40status_t check_size_error(ssize_t bytesReturned, ssize_t bytesExpected); 41 42uint16 calculate_crc(uint8 *data, uint16 length); 43 44} // namespace Udf 45 46#endif // _UDF_UTILS_H 47 48