]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
disk_partition: introduce macros for description string lengths
authorAlison Chaiken <alison@peloton-tech.com>
Sun, 25 Jun 2017 23:43:18 +0000 (16:43 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 4 Aug 2017 13:55:29 +0000 (09:55 -0400)
Changes since v6: none.

Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
include/part.h

index 6ace09f3aa4b015dfd8058b2bd362b6f873d5947..87b11112b8d85a457e763a8d028295788338f39d 100644 (file)
@@ -47,12 +47,15 @@ struct block_drvr {
 #define DEV_TYPE_CDROM         0x05    /* CD-ROM */
 #define DEV_TYPE_OPDISK                0x07    /* optical disk */
 
+#define PART_NAME_LEN 32
+#define PART_TYPE_LEN 32
+
 typedef struct disk_partition {
        lbaint_t        start;  /* # of first block in partition        */
        lbaint_t        size;   /* number of blocks in partition        */
        ulong   blksz;          /* block size in bytes                  */
-       uchar   name[32];       /* partition name                       */
-       uchar   type[32];       /* string type description              */
+       uchar   name[PART_NAME_LEN];    /* partition name                       */
+       uchar   type[PART_TYPE_LEN];    /* string type description              */
        int     bootable;       /* Active/Bootable flag is set          */
 #if CONFIG_IS_ENABLED(PARTITION_UUIDS)
        char    uuid[UUID_STR_LEN + 1]; /* filesystem UUID as string, if exists */