check.h 551 B

123456789101112131415161718192021222324252627282930
  1. #include <linux/pagemap.h>
  2. #include <linux/blkdev.h>
  3. /*
  4. * add_gd_partition adds a partitions details to the devices partition
  5. * description.
  6. */
  7. struct parsed_partitions {
  8. char name[BDEVNAME_SIZE];
  9. struct {
  10. sector_t from;
  11. sector_t size;
  12. int flags;
  13. } parts[DISK_MAX_PARTS];
  14. int next;
  15. int limit;
  16. };
  17. static inline void
  18. put_partition(struct parsed_partitions *p, int n, sector_t from, sector_t size)
  19. {
  20. if (n < p->limit) {
  21. p->parts[n].from = from;
  22. p->parts[n].size = size;
  23. printk(" %s%d", p->name, n);
  24. }
  25. }
  26. extern int warn_no_part;