File: udfend.h

package info (click to toggle)
linux 3.16.7-ckt4-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 736,636 kB
  • ctags: 2,374,727
  • sloc: ansic: 12,214,218; asm: 277,326; perl: 54,003; xml: 47,771; makefile: 30,483; sh: 8,035; python: 6,597; cpp: 5,124; yacc: 4,254; lex: 2,215; awk: 741; pascal: 231; lisp: 218; sed: 30
file content (77 lines) | stat: -rw-r--r-- 1,612 bytes parent folder | download | duplicates (26)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef __UDF_ENDIAN_H
#define __UDF_ENDIAN_H

#include <asm/byteorder.h>
#include <linux/string.h>

static inline struct kernel_lb_addr lelb_to_cpu(struct lb_addr in)
{
	struct kernel_lb_addr out;

	out.logicalBlockNum = le32_to_cpu(in.logicalBlockNum);
	out.partitionReferenceNum = le16_to_cpu(in.partitionReferenceNum);

	return out;
}

static inline struct lb_addr cpu_to_lelb(struct kernel_lb_addr in)
{
	struct lb_addr out;

	out.logicalBlockNum = cpu_to_le32(in.logicalBlockNum);
	out.partitionReferenceNum = cpu_to_le16(in.partitionReferenceNum);

	return out;
}

static inline struct short_ad lesa_to_cpu(struct short_ad in)
{
	struct short_ad out;

	out.extLength = le32_to_cpu(in.extLength);
	out.extPosition = le32_to_cpu(in.extPosition);

	return out;
}

static inline struct short_ad cpu_to_lesa(struct short_ad in)
{
	struct short_ad out;

	out.extLength = cpu_to_le32(in.extLength);
	out.extPosition = cpu_to_le32(in.extPosition);

	return out;
}

static inline struct kernel_long_ad lela_to_cpu(struct long_ad in)
{
	struct kernel_long_ad out;

	out.extLength = le32_to_cpu(in.extLength);
	out.extLocation = lelb_to_cpu(in.extLocation);

	return out;
}

static inline struct long_ad cpu_to_lela(struct kernel_long_ad in)
{
	struct long_ad out;

	out.extLength = cpu_to_le32(in.extLength);
	out.extLocation = cpu_to_lelb(in.extLocation);

	return out;
}

static inline struct kernel_extent_ad leea_to_cpu(struct extent_ad in)
{
	struct kernel_extent_ad out;

	out.extLength = le32_to_cpu(in.extLength);
	out.extLocation = le32_to_cpu(in.extLocation);

	return out;
}

#endif /* __UDF_ENDIAN_H */