diff options
Diffstat (limited to 'include/part.h')
| -rw-r--r-- | include/part.h | 23 | 
1 files changed, 21 insertions, 2 deletions
| diff --git a/include/part.h b/include/part.h index e1478f4eb..27ea283f1 100644 --- a/include/part.h +++ b/include/part.h @@ -93,11 +93,15 @@ typedef struct disk_partition {  	ulong	blksz;		/* block size in bytes			*/  	uchar	name[32];	/* partition name			*/  	uchar	type[32];	/* string type description		*/ +	int	bootable;	/* Active/Bootable flag is set		*/ +#ifdef CONFIG_PARTITION_UUIDS +	char	uuid[37];	/* filesystem UUID as string, if exists	*/ +#endif  } disk_partition_t;  /* Misc _get_dev functions */  #ifdef CONFIG_PARTITIONS -block_dev_desc_t* get_dev(char* ifname, int dev); +block_dev_desc_t *get_dev(const char *ifname, int dev);  block_dev_desc_t* ide_get_dev(int dev);  block_dev_desc_t* sata_get_dev(int dev);  block_dev_desc_t* scsi_get_dev(int dev); @@ -111,8 +115,14 @@ int get_partition_info (block_dev_desc_t * dev_desc, int part, disk_partition_t  void print_part (block_dev_desc_t *dev_desc);  void  init_part (block_dev_desc_t *dev_desc);  void dev_print(block_dev_desc_t *dev_desc); +int get_device(const char *ifname, const char *dev_str, +	       block_dev_desc_t **dev_desc); +int get_device_and_partition(const char *ifname, const char *dev_part_str, +			     block_dev_desc_t **dev_desc, +			     disk_partition_t *info, int allow_whole_dev);  #else -static inline block_dev_desc_t* get_dev(char* ifname, int dev) { return NULL; } +static inline block_dev_desc_t *get_dev(const char *ifname, int dev) +{ return NULL; }  static inline block_dev_desc_t* ide_get_dev(int dev) { return NULL; }  static inline block_dev_desc_t* sata_get_dev(int dev) { return NULL; }  static inline block_dev_desc_t* scsi_get_dev(int dev) { return NULL; } @@ -126,6 +136,15 @@ static inline int get_partition_info (block_dev_desc_t * dev_desc, int part,  static inline void print_part (block_dev_desc_t *dev_desc) {}  static inline void  init_part (block_dev_desc_t *dev_desc) {}  static inline void dev_print(block_dev_desc_t *dev_desc) {} +static inline int get_device(const char *ifname, const char *dev_str, +	       block_dev_desc_t **dev_desc) +{ return -1; } +static inline int get_device_and_partition(const char *ifname, +					   const char *dev_part_str, +					   block_dev_desc_t **dev_desc, +					   disk_partition_t *info, +					   int allow_whole_dev) +{ *dev_desc = NULL; return -1; }  #endif  #ifdef CONFIG_MAC_PARTITION |