1 From 45aeed0c658cc86e93ae3ae101404e12bec6e102 Mon Sep 17 00:00:00 2001
2 From: Andreas Bombe <aeb@debian.org>
3 Date: Sun, 16 Nov 2014 19:49:22 +0100
4 Subject: [PATCH 02/14] Fix indentation of "fix power loss damage" commit
6 I fixed the (sometimes misleading) indentation of the code introduced in
7 commit 6893c45 to be in line with the reset of the code and also removed
8 the /* PATCH ED+DL */ comments which are quite meaningless to the wider
11 Signed-off-by: Andreas Bombe <aeb@debian.org>
13 src/check.c | 57 ++++++++++++++++++++++++---------------------------------
14 1 file changed, 24 insertions(+), 33 deletions(-)
16 diff --git a/src/check.c b/src/check.c
17 index e8aaf92..daa6d69 100644
20 @@ -273,11 +273,10 @@ static int bad_name(DOS_FILE * file)
21 strncmp((const char *)name, "WP ROOT SF", 11) == 0)
25 - /* check if we have neither a long filename nor a short name */
26 - if ((file->lfn == NULL) && (file->dir_ent.lcase & FAT_NO_83NAME)) {
29 + /* check if we have neither a long filename nor a short name */
30 + if ((file->lfn == NULL) && (file->dir_ent.lcase & FAT_NO_83NAME)) {
34 /* don't complain about the dummy 11 bytes used by patched Linux
36 @@ -401,20 +400,16 @@ static void auto_rename(DOS_FILE * file)
37 (const char *)file->dir_ent.name, MSDOS_NAME))
41 - if(file->dir_ent.lcase & FAT_NO_83NAME)
43 - /* as we only assign a new 8.3 filename, reset flag that 8.3 name is not
45 - file->dir_ent.lcase &= ~FAT_NO_83NAME;
46 - /* reset the attributes */
47 - file->dir_ent.attr &= ~(ATTR_DIR | ATTR_VOLUME); /* only keep the DIR and VOLUME attributes */
48 - fs_write(file->offset, MSDOS_NAME+2, file->dir_ent.name);
52 - fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
54 + if (file->dir_ent.lcase & FAT_NO_83NAME) {
55 + /* as we only assign a new 8.3 filename, reset flag that 8.3 name is not
57 + file->dir_ent.lcase &= ~FAT_NO_83NAME;
58 + /* reset the attributes, only keep DIR and VOLUME */
59 + file->dir_ent.attr &= ~(ATTR_DIR | ATTR_VOLUME);
60 + fs_write(file->offset, MSDOS_NAME + 2, file->dir_ent.name);
62 + fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
65 lfn_fix_checksum(file->lfn_offset, file->offset,
66 (const char *)file->dir_ent.name);
67 @@ -448,20 +443,16 @@ static void rename_file(DOS_FILE * file)
69 for (walk = name; *walk == ' ' || *walk == '\t'; walk++) ;
70 if (file_cvt(walk, file->dir_ent.name)) {
72 - if(file->dir_ent.lcase & FAT_NO_83NAME)
74 - /* as we only assign a new 8.3 filename, reset flag that 8.3 name is not
76 - file->dir_ent.lcase &= ~FAT_NO_83NAME;
77 - /* reset the attributes */
78 - file->dir_ent.attr &= ~(ATTR_DIR | ATTR_VOLUME); /* only keep the DIR and VOLUME attributes */
79 - fs_write(file->offset, MSDOS_NAME+2, file->dir_ent.name);
83 - fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
85 + if (file->dir_ent.lcase & FAT_NO_83NAME) {
86 + /* as we only assign a new 8.3 filename, reset flag that 8.3 name is not
88 + file->dir_ent.lcase &= ~FAT_NO_83NAME;
89 + /* reset the attributes, only keep DIR and VOLUME */
90 + file->dir_ent.attr &= ~(ATTR_DIR | ATTR_VOLUME);
91 + fs_write(file->offset, MSDOS_NAME + 2, file->dir_ent.name);
93 + fs_write(file->offset, MSDOS_NAME, file->dir_ent.name);
96 lfn_fix_checksum(file->lfn_offset, file->offset,
97 (const char *)file->dir_ent.name);