xref: /haiku/src/add-ons/kernel/file_systems/udf/Utils.h (revision 17889a8c70dbb3d59c1412f6431968753c767bab)
1 /*
2  * Copyright 2003, Tyler Dauwalder, tyler@dauwalder.net.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _UDF_UTILS_H
6 #define _UDF_UTILS_H
7 
8 #include <SupportDefs.h>
9 
10 /*! \file Utils.h - Miscellaneous Udf utility functions. */
11 
12 class timestamp;
13 struct long_address;
14 
15 const char		*bool_to_string(bool value);
16 uint16			calculate_crc(uint8 *data, uint16 length);
17 status_t		check_size_error(ssize_t bytesReturned, ssize_t bytesExpected);
18 status_t		get_block_shift(uint32 blockSize, uint32 &blockShift);
19 status_t		decode_time(timestamp &timestamp, struct timespec &timespec);
20 long_address 	to_long_address(ino_t id, uint32 length = 0);
21 ino_t			to_vnode_id(long_address address);
22 
23 #endif	// _UDF_UTILS_H
24