check.h 571 B

1234567891011121314151617181920212223242526272829303132
  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. enum { MAX_PART = 256 };
  8. struct parsed_partitions {
  9. char name[BDEVNAME_SIZE];
  10. struct {
  11. sector_t from;
  12. sector_t size;
  13. int flags;
  14. } parts[MAX_PART];
  15. int next;
  16. int limit;
  17. };
  18. static inline void
  19. put_partition(struct parsed_partitions *p, int n, sector_t from, sector_t size)
  20. {
  21. if (n < p->limit) {
  22. p->parts[n].from = from;
  23. p->parts[n].size = size;
  24. printk(" %s%d", p->name, n);
  25. }
  26. }
  27. extern int warn_no_part;