patch-lib_libmtd_c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --- mtd-utils-1.5.0.orig/lib/libmtd.c 2012-05-07 09:19:39.000000000 +0200
  2. +++ mtd-utils-1.5.0/lib/libmtd.c 2014-03-30 15:49:26.000000000 +0200
  3. @@ -1006,7 +1006,7 @@ out:
  4. int mtd_is_bad(const struct mtd_dev_info *mtd, int fd, int eb)
  5. {
  6. int ret;
  7. - loff_t seek;
  8. + off_t seek;
  9. ret = mtd_valid_erase_block(mtd, eb);
  10. if (ret)
  11. @@ -1015,7 +1015,7 @@ int mtd_is_bad(const struct mtd_dev_info
  12. if (!mtd->bb_allowed)
  13. return 0;
  14. - seek = (loff_t)eb * mtd->eb_size;
  15. + seek = (off_t)eb * mtd->eb_size;
  16. ret = ioctl(fd, MEMGETBADBLOCK, &seek);
  17. if (ret == -1)
  18. return mtd_ioctl_error(mtd, eb, "MEMGETBADBLOCK");
  19. @@ -1025,7 +1025,7 @@ int mtd_is_bad(const struct mtd_dev_info
  20. int mtd_mark_bad(const struct mtd_dev_info *mtd, int fd, int eb)
  21. {
  22. int ret;
  23. - loff_t seek;
  24. + off_t seek;
  25. if (!mtd->bb_allowed) {
  26. errno = EINVAL;
  27. @@ -1036,7 +1036,7 @@ int mtd_mark_bad(const struct mtd_dev_in
  28. if (ret)
  29. return ret;
  30. - seek = (loff_t)eb * mtd->eb_size;
  31. + seek = (off_t)eb * mtd->eb_size;
  32. ret = ioctl(fd, MEMSETBADBLOCK, &seek);
  33. if (ret == -1)
  34. return mtd_ioctl_error(mtd, eb, "MEMSETBADBLOCK");