Skip to content

Commit

Permalink
More fixes to APFS driver
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaGarg8 committed Aug 25, 2024
1 parent 91849e0 commit 874b183
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 8001-Add-APFS-driver.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11641,7 +11641,7 @@ index 000000000..74799d8b1
+#include <linux/string.h>
+#include "libzbitmap.h"
+
+#define MIN(x, y) ((x) > (y) ? (y) : (x))
+#define APFS_MIN(x, y) ((x) > (y) ? (y) : (x))
+
+#define ZBM_MAGIC "ZBM\x09"
+#define ZBM_MAGIC_SZ 4
Expand Down Expand Up @@ -25085,7 +25085,7 @@ index 000000000..d17064e1f
+#include <linux/ctype.h>
+#include "unicode.h"
+
+#define MIN(X, Y) ((X) <= (Y) ? (X) : (Y))
+#define APFS_MIN(X, Y) ((X) <= (Y) ? (X) : (Y))
+
+/* The arrays of unicode data are defined at the bottom of the file */
+/* TODO: would a single trie with all the data be more efficient? */
Expand Down Expand Up @@ -25305,7 +25305,7 @@ index 000000000..d17064e1f
+ while (1) {
+ if (!total_len || !*utf8str)
+ return norm_len;
+ utf8len = utf8_to_utf32(utf8str, MIN(total_len, 4), &utf32char);
+ utf8len = utf8_to_utf32(utf8str, APFS_MIN(total_len, 4), &utf32char);
+ if (utf8len < 0) /* Invalid unicode; don't normalize anything */
+ return 0;
+
Expand Down Expand Up @@ -25377,7 +25377,7 @@ index 000000000..d17064e1f
+ unicode_t utf32char;
+ int utf8len, pos;
+
+ utf8len = utf8_to_utf32(utf8str, MIN(total_len, 4), &utf32char);
+ utf8len = utf8_to_utf32(utf8str, APFS_MIN(total_len, 4), &utf32char);
+ for (pos = 0;; pos++, str_pos++) {
+ unicode_t utf32norm;
+ u8 ccc;
Expand Down

0 comments on commit 874b183

Please sign in to comment.