mtd_test.h 689 B

123456789101112131415161718192021222324
  1. #include <linux/mtd/mtd.h>
  2. #include <linux/sched.h>
  3. static inline int mtdtest_relax(void)
  4. {
  5. cond_resched();
  6. if (signal_pending(current)) {
  7. pr_info("aborting test due to pending signal!\n");
  8. return -EINTR;
  9. }
  10. return 0;
  11. }
  12. int mtdtest_erase_eraseblock(struct mtd_info *mtd, unsigned int ebnum);
  13. int mtdtest_scan_for_bad_eraseblocks(struct mtd_info *mtd, unsigned char *bbt,
  14. unsigned int eb, int ebcnt);
  15. int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt,
  16. unsigned int eb, int ebcnt);
  17. int mtdtest_read(struct mtd_info *mtd, loff_t addr, size_t size, void *buf);
  18. int mtdtest_write(struct mtd_info *mtd, loff_t addr, size_t size,
  19. const void *buf);