mtd.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. diff -ur mtd-20050122.orig/util/flash_eraseall.c mtd-20050122.orig-patched/util/flash_eraseall.c
  2. --- mtd-20050122.orig/util/flash_eraseall.c 2004-12-09 17:00:52.000000000 -0600
  3. +++ mtd-20050122.orig-patched/util/flash_eraseall.c 2007-01-13 22:56:51.864233154 -0600
  4. @@ -54,7 +54,7 @@
  5. static void display_help (void);
  6. static void display_version (void);
  7. static struct jffs2_unknown_node cleanmarker;
  8. -static int target_endian = __BYTE_ORDER;
  9. +int target_endian = __BYTE_ORDER;
  10. int main (int argc, char *argv[])
  11. {
  12. @@ -134,7 +134,7 @@
  13. if (!quiet)
  14. printf ("\nSkipping bad block at 0x%08x\n", erase.start);
  15. continue;
  16. - } else if (ret == -EOPNOTSUPP) {
  17. + } else if (errno == EOPNOTSUPP) {
  18. fprintf(stderr, "%s: %s: Bad block check not available\n", exe_name, mtd_device);
  19. bbtest = 0;
  20. } else if (ret < 0) {
  21. diff -ur mtd-20050122.orig/util/mkfs.jffs2.c mtd-20050122.orig-patched/util/mkfs.jffs2.c
  22. --- mtd-20050122.orig/util/mkfs.jffs2.c 2004-11-26 17:00:13.000000000 -0600
  23. +++ mtd-20050122.orig-patched/util/mkfs.jffs2.c 2007-01-13 22:55:53.627687214 -0600
  24. @@ -101,7 +101,7 @@
  25. static int squash_uids = 0;
  26. static int squash_perms = 0;
  27. static int fake_times = 0;
  28. -static int target_endian = __BYTE_ORDER;
  29. +int target_endian = __BYTE_ORDER;
  30. static const char *const app_name = "mkfs.jffs2";
  31. static const char *const memory_exhausted = "memory exhausted";
  32. diff -ur mtd-20050122.orig/util/sumtool.c mtd-20050122.orig-patched/util/sumtool.c
  33. --- mtd-20050122.orig/util/sumtool.c 2005-01-05 17:00:16.000000000 -0600
  34. +++ mtd-20050122.orig-patched/util/sumtool.c 2007-01-13 22:56:05.528616125 -0600
  35. @@ -68,7 +68,7 @@
  36. static int cleanmarker_size = sizeof(cleanmarker);
  37. static const char *short_options = "o:i:e:hvVblnc:p";
  38. static int erase_block_size = 65536;
  39. -static int target_endian = __BYTE_ORDER;
  40. +int target_endian = __BYTE_ORDER;
  41. static int out_fd = -1;
  42. static int in_fd = -1;