summaryrefslogtreecommitdiff
path: root/package/dosfstools/patches/patch-src_lfn_c
blob: dfda2dc3e10cf43c03c56f2d3e5da5cbac8e984d (plain)
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
--- dosfstools-3.0.26.orig/src/lfn.c	2014-01-17 07:07:16.000000000 +0100
+++ dosfstools-3.0.26/src/lfn.c	2014-03-26 13:24:23.000000000 +0100
@@ -52,7 +52,7 @@ typedef struct {
 unsigned char *lfn_unicode = NULL;
 unsigned char lfn_checksum;
 int lfn_slot = -1;
-loff_t *lfn_offsets = NULL;
+off_t *lfn_offsets = NULL;
 int lfn_parts = 0;
 
 static unsigned char fat_uni2esc[64] = {
@@ -170,7 +170,7 @@ static void clear_lfn_slots(int start, i
     }
 }
 
-void lfn_fix_checksum(loff_t from, loff_t to, const char *short_name)
+void lfn_fix_checksum(off_t from, off_t to, const char *short_name)
 {
     int i;
     __u8 sum;
@@ -195,7 +195,7 @@ void lfn_reset(void)
 
 /* This function is only called with de->attr == VFAT_LN_ATTR. It stores part
  * of the long name. */
-void lfn_add_slot(DIR_ENT * de, loff_t dir_offset)
+void lfn_add_slot(DIR_ENT * de, off_t dir_offset)
 {
     LFN_ENT *lfn = (LFN_ENT *) de;
     int slot = lfn->id & LFN_ID_SLOTMASK;
@@ -253,7 +253,7 @@ void lfn_add_slot(DIR_ENT * de, loff_t d
 	lfn_slot = slot;
 	lfn_checksum = lfn->alias_checksum;
 	lfn_unicode = alloc((lfn_slot * CHARS_PER_LFN + 1) * 2);
-	lfn_offsets = alloc(lfn_slot * sizeof(loff_t));
+	lfn_offsets = alloc(lfn_slot * sizeof(off_t));
 	lfn_parts = 0;
     } else if (lfn_slot == -1 && slot != 0) {
 	/* No LFN in progress, but slot found; start bit missing */
@@ -272,7 +272,7 @@ void lfn_add_slot(DIR_ENT * de, loff_t d
 	switch (interactive ? get_key("123", "?") : '2') {
 	case '1':
 	    if (!lfn_offsets)
-		lfn_offsets = alloc(sizeof(loff_t));
+		lfn_offsets = alloc(sizeof(off_t));
 	    lfn_offsets[0] = dir_offset;
 	    clear_lfn_slots(0, 0);
 	    lfn_reset();
@@ -287,7 +287,7 @@ void lfn_add_slot(DIR_ENT * de, loff_t d
 	    lfn_slot = slot;
 	    lfn_checksum = lfn->alias_checksum;
 	    lfn_unicode = alloc((lfn_slot * CHARS_PER_LFN + 1) * 2);
-	    lfn_offsets = alloc(lfn_slot * sizeof(loff_t));
+	    lfn_offsets = alloc(lfn_slot * sizeof(off_t));
 	    lfn_parts = 0;
 	    break;
 	}
@@ -319,7 +319,7 @@ void lfn_add_slot(DIR_ENT * de, loff_t d
 	switch (interactive ? get_key(can_fix ? "123" : "12", "?") : '2') {
 	case '1':
 	    if (!lfn_offsets) {
-		lfn_offsets = alloc(sizeof(loff_t));
+		lfn_offsets = alloc(sizeof(off_t));
 		lfn_parts = 0;
 	    }
 	    lfn_offsets[lfn_parts++] = dir_offset;
@@ -406,7 +406,7 @@ void lfn_add_slot(DIR_ENT * de, loff_t d
 
 /* This function is always called when de->attr != VFAT_LN_ATTR is found, to
  * retrieve the previously constructed LFN. */
-char *lfn_get(DIR_ENT * de, loff_t * lfn_offset)
+char *lfn_get(DIR_ENT * de, off_t * lfn_offset)
 {
     char *lfn;
     __u8 sum;