~davewalker/ubuntu/natty/ocfs2-tools/bug_363877

« back to all changes in this revision

Viewing changes to libocfs2/blockcheck.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2011-01-14 12:46:49 UTC
  • mfrom: (1.1.10 upstream) (0.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20110114124649-vbe5qz211f3zxwuf
Tags: 1.6.3-1ubuntu1
* Merge from debian unstable (LP: #703008).  Remaining changes:
  - Fix configure tests for ld --as-needed.
  - Fix build failure with ld --no-add-needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c; c-basic-offset: 8; -*-
2
 
 * vim: noexpandtab sw=8 ts=8 sts=0:
3
 
 *
4
 
 * blockcheck.h
5
 
 *
6
 
 * Checksum and ECC codes for the OCFS2 userspace library.
7
 
 *
8
 
 * Copyright (C) 2004, 2008 Oracle.  All rights reserved.
9
 
 *
10
 
 * This program is free software; you can redistribute it and/or
11
 
 * modify it under the terms of the GNU General Public
12
 
 * License, version 2, as published by the Free Software Foundation.
13
 
 *
14
 
 * This program is distributed in the hope that it will be useful,
15
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
 
 * General Public License for more details.
18
 
 */
19
 
 
20
 
#ifndef _BLOCKCHECK_H
21
 
#define _BLOCKCHECK_H
22
 
 
23
 
extern uint32_t ocfs2_hamming_encode(uint32_t parity, void *data,
24
 
                                     unsigned int d, unsigned int nr);
25
 
extern uint32_t ocfs2_hamming_encode_block(void *data, unsigned int d);
26
 
extern void ocfs2_hamming_fix(void *data, unsigned int d, unsigned int nr,
27
 
                              unsigned int fix);
28
 
extern void ocfs2_hamming_fix_block(void *data, unsigned int d,
29
 
                                    unsigned int fix);
30
 
extern uint32_t crc32_le(uint32_t crc, unsigned char const *p, size_t len);
31
 
#endif