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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
From 45aeed0c658cc86e93ae3ae101404e12bec6e102 Mon Sep 17 00:00:00 2001
From: Andreas Bombe <aeb@debian.org>
Date: Sun, 16 Nov 2014 19:49:22 +0100
Subject: [PATCH 02/14] Fix indentation of "fix power loss damage" commit
I fixed the (sometimes misleading) indentation of the code introduced in
commit 6893c45 to be in line with the reset of the code and also removed
the /* PATCH ED+DL */ comments which are quite meaningless to the wider
world.
Signed-off-by: Andreas Bombe <aeb@debian.org>
---
src/check.c | 57 ++++++++++++++++++++++++---------------------------------
1 file changed, 24 insertions(+), 33 deletions(-)
diff --git a/src/check.c b/src/check.c
index e8aaf92..daa6d69 100644
--- a/src/check.c
+++ b/src/check.c
@@ -273,11 +273,10 @@ static int bad_name(DOS_FILE * file)
strncmp((const char *)name, "WP ROOT SF", 11) == 0)
return 0;
- /* PATCH ED+DL */
- /* check if we have neither a long filename nor a short name */
- if ((file->lfn == NULL) && (file->dir_ent.lcase & FAT_NO_83NAME)) {
- return 1;
- }
+ /* check if we have neither a long filename nor a short name */
+ if ((file->lfn == NULL) && (file->dir_ent.lcase & FAT_NO_83NAME)) {
+ return 1;
+ }
/* don't complain about the dummy 11 bytes used by patched Linux
kernels */
@@ -401,20 +400,16 @@ static void auto_rename(DOS_FILE * file)
(const char *)file->dir_ent.name, MSDOS_NAME))
break;
if (!walk) {
- /* PATCH ED+DL */
- if(file->dir_ent.lcase & FAT_NO_83NAME)
- {
- /* as we only assign a new 8.3 filename, reset flag that 8.3 name is not
- present */
- file->dir_ent.lcase &= ~FAT_NO_83NAME;
- /* reset the attributes */
- file->dir_ent.attr &= ~(ATTR_DIR | ATTR_VOLUME); /* only keep the DIR and VOLUME attributes */
- fs_write(file->offset, MSDOS_NAME+2, file->dir_ent.name);
- }
- else
- {
- fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
- }
+ if (file->dir_ent.lcase & FAT_NO_83NAME) {
+ /* as we only assign a new 8.3 filename, reset flag that 8.3 name is not
+ present */
+ file->dir_ent.lcase &= ~FAT_NO_83NAME;
+ /* reset the attributes, only keep DIR and VOLUME */
+ file->dir_ent.attr &= ~(ATTR_DIR | ATTR_VOLUME);
+ fs_write(file->offset, MSDOS_NAME + 2, file->dir_ent.name);
+ } else {
+ fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
+ }
if (file->lfn)
lfn_fix_checksum(file->lfn_offset, file->offset,
(const char *)file->dir_ent.name);
@@ -448,20 +443,16 @@ static void rename_file(DOS_FILE * file)
walk[1] = 0;
for (walk = name; *walk == ' ' || *walk == '\t'; walk++) ;
if (file_cvt(walk, file->dir_ent.name)) {
- /* PATCH ED+DL */
- if(file->dir_ent.lcase & FAT_NO_83NAME)
- {
- /* as we only assign a new 8.3 filename, reset flag that 8.3 name is not
- present */
- file->dir_ent.lcase &= ~FAT_NO_83NAME;
- /* reset the attributes */
- file->dir_ent.attr &= ~(ATTR_DIR | ATTR_VOLUME); /* only keep the DIR and VOLUME attributes */
- fs_write(file->offset, MSDOS_NAME+2, file->dir_ent.name);
- }
- else
- {
- fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
- }
+ if (file->dir_ent.lcase & FAT_NO_83NAME) {
+ /* as we only assign a new 8.3 filename, reset flag that 8.3 name is not
+ present */
+ file->dir_ent.lcase &= ~FAT_NO_83NAME;
+ /* reset the attributes, only keep DIR and VOLUME */
+ file->dir_ent.attr &= ~(ATTR_DIR | ATTR_VOLUME);
+ fs_write(file->offset, MSDOS_NAME + 2, file->dir_ent.name);
+ } else {
+ fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
+ }
if (file->lfn)
lfn_fix_checksum(file->lfn_offset, file->offset,
(const char *)file->dir_ent.name);
--
1.9.1
|