~ubuntu-branches/ubuntu/precise/fuse-exfat/precise-backports

« back to all changes in this revision

Viewing changes to libexfat/exfat.h

  • Committer: Package Import Robot
  • Author(s): Sven Hoexter
  • Date: 2012-08-12 20:05:10 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120812200510-i7a1tp82r4fwvav9
Tags: 0.9.8-1
* New upstream release.
* Dropped all patches - merged upstream.
* Dropped all usage of quilt - currently not required.
* No longer use CFLAGS as CCFLAGS, the SConstruct file
  now honors CCFLAGS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
        Definitions of structures and constants used in exFAT file system
4
4
        implementation.
5
5
 
6
 
        Copyright (C) 2009, 2010  Andrew Nayenko
 
6
        Copyright (C) 2010-2012  Andrew Nayenko
7
7
 
8
8
        This program is free software: you can redistribute it and/or modify
9
9
        it under the terms of the GNU General Public License as published by
38
38
#define IS_CONTIGUOUS(node) (((node).flags & EXFAT_ATTRIB_CONTIGUOUS) != 0)
39
39
#define SECTOR_SIZE(sb) (1 << (sb).sector_bits)
40
40
#define CLUSTER_SIZE(sb) (SECTOR_SIZE(sb) << (sb).spc_bits)
41
 
#define CLUSTER_INVALID(c) ((c) == EXFAT_CLUSTER_BAD || (c) == EXFAT_CLUSTER_END)
 
41
#define CLUSTER_INVALID(c) ((c) > EXFAT_LAST_DATA_CLUSTER)
42
42
 
43
43
#define MIN(a, b) ((a) < (b) ? (a) : (b))
 
44
#define MAX(a, b) ((a) > (b) ? (a) : (b))
44
45
#define DIV_ROUND_UP(x, d) (((x) + (d) - 1) / (d))
 
46
#define ROUND_UP(x, d) (DIV_ROUND_UP(x, d) * (d))
45
47
 
46
48
#define BMAP_GET(bitmap, index) \
47
49
        (((uint8_t*) bitmap)[(index) / 8] & (1u << ((index) % 8)))