Dash:
[t2-trunk.git] / package / filesystem / disktype / exfat.patch
blobd10d40215cf5e5e9efb5b7b9b1bc2ccafcd854b7
1 --- a/detect.c
2 +++ b/detect.c
3 @@ -47,6 +47,7 @@
4 void detect_dos_partmap(SECTION *section, int level);
5 void detect_gpt_partmap(SECTION *section, int level);
6 void detect_fat(SECTION *section, int level);
7 +void detect_exfat(SECTION *section, int level);
8 void detect_ntfs(SECTION *section, int level);
9 void detect_hpfs(SECTION *section, int level);
10 void detect_dos_loader(SECTION *section, int level);
11 @@ -131,6 +132,7 @@
12 detect_amiga_fs,
13 detect_apple_volume,
14 detect_fat,
15 + detect_exfat,
16 detect_ntfs,
17 detect_hpfs,
18 detect_udf,
19 --- a/dos.c
20 +++ b/dos.c
21 @@ -429,6 +429,8 @@
22 /* since the above is also present on NTFS, make sure it's not NTFS... */
23 if (memcmp(buf + 3, "NTFS ", 8) == 0)
24 return;
25 + if (memcmp(buf + 3, "EXFAT ", 8) == 0)
26 + return;
28 /* next, some soft tests, taking score */
29 score = 0;
30 @@ -516,6 +518,25 @@
34 + * exFAT file system
35 + */
37 +void detect_exfat(SECTION *section, int level)
39 + unsigned char *buf;
41 + if (get_buffer(section, 0, 512, (void **)&buf) < 512)
42 + return;
44 + /* check signatures */
45 + if (memcmp(buf + 3, "EXFAT ", 8) != 0)
46 + return;
48 + /* tell the user */
49 + print_line(level, "exFAT file system");
52 +/*
53 * NTFS file system