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
12class timestamp;
13struct long_address;
14
15const char		*bool_to_string(bool value);
16uint16			calculate_crc(uint8 *data, uint16 length);
17status_t		check_size_error(ssize_t bytesReturned, ssize_t bytesExpected);
18status_t		get_block_shift(uint32 blockSize, uint32 &blockShift);
19status_t		decode_time(timestamp &timestamp, struct timespec &timespec);
20long_address 	to_long_address(ino_t id, uint32 length = 0);
21ino_t			to_vnode_id(long_address address);
22
23#endif	// _UDF_UTILS_H
24