summaryrefslogtreecommitdiffstats
path: root/u-boot/include/part.h
diff options
context:
space:
mode:
Diffstat (limited to 'u-boot/include/part.h')
-rwxr-xr-x[-rw-r--r--]u-boot/include/part.h44
1 files changed, 41 insertions, 3 deletions
diff --git a/u-boot/include/part.h b/u-boot/include/part.h
index 3cdae02..27ea283 100644..100755
--- a/u-boot/include/part.h
+++ b/u-boot/include/part.h
@@ -36,7 +36,7 @@ typedef struct block_dev_desc {
#ifdef CONFIG_LBA48
unsigned char lba48; /* device can use 48bit addr (ATA/ATAPI v7) */
#endif
- lbaint_t lba; /* number of blocks */
+ lbaint_t lba; /* number of blocks */
unsigned long blksz; /* block size */
char vendor [40+1]; /* IDE model, SCSI Vendor */
char product[20+1]; /* IDE Serial no, SCSI product */
@@ -49,6 +49,9 @@ typedef struct block_dev_desc {
unsigned long start,
lbaint_t blkcnt,
const void *buffer);
+ unsigned long (*block_erase)(int dev,
+ unsigned long start,
+ lbaint_t blkcnt);
void *priv; /* driver private struct pointer */
}block_dev_desc_t;
@@ -90,10 +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 */
-block_dev_desc_t* get_dev(char* ifname, int dev);
+#ifdef CONFIG_PARTITIONS
+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);
@@ -107,7 +115,37 @@ 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(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; }
+static inline block_dev_desc_t* usb_stor_get_dev(int dev) { return NULL; }
+static inline block_dev_desc_t* mmc_get_dev(int dev) { return NULL; }
+static inline block_dev_desc_t* systemace_get_dev(int dev) { return NULL; }
+static inline block_dev_desc_t* mg_disk_get_dev(int dev) { return NULL; }
+
+static inline int get_partition_info (block_dev_desc_t * dev_desc, int part,
+ disk_partition_t *info) { return -1; }
+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
/* disk/part_mac.c */