layout.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * This file is part of the flashrom project.
  3. *
  4. * Copyright (C) 2013 Google Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; version 2 of the License.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  18. */
  19. #ifndef FLASHMAP_LIB_LAYOUT_H__
  20. #define FLASHMAP_LIB_LAYOUT_H__
  21. typedef struct romlayout {
  22. unsigned int start;
  23. unsigned int end;
  24. unsigned int included;
  25. char name[256];
  26. char file[256]; /* file[0]=='\0' means not specified. */
  27. } romlayout_t;
  28. /**
  29. * Extract regions to current directory
  30. *
  31. * @flash: Information about flash chip to access
  32. * @return 0 if OK, non-zero on error
  33. */
  34. int extract_regions(struct flashctx *flash);
  35. int fill_romentry(romlayout_t *entry, int n);
  36. #endif