summaryrefslogtreecommitdiff
path: root/package/dosfstools/patches/patch-src_lfn_c
diff options
context:
space:
mode:
Diffstat (limited to 'package/dosfstools/patches/patch-src_lfn_c')
-rw-r--r--package/dosfstools/patches/patch-src_lfn_c74
1 files changed, 74 insertions, 0 deletions
diff --git a/package/dosfstools/patches/patch-src_lfn_c b/package/dosfstools/patches/patch-src_lfn_c
new file mode 100644
index 000000000..dfda2dc3e
--- /dev/null
+++ b/package/dosfstools/patches/patch-src_lfn_c
@@ -0,0 +1,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;