aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/genhd.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-11-08 19:12:25 -0500
committerJens Axboe <axboe@kernel.dk>2012-11-23 08:28:53 -0500
commit1ad7e89940d5ac411928189e1a4a01901dbf590f (patch)
tree64bfe2bceb4d157320465d529869783443e031bf /include/linux/genhd.h
parentd48c152a41c8cd6de832397b4ea6f0429ad86318 (diff)
block: store partition_meta_info.uuid as a string
This will allow other types of UUID to be stored here, aside from true UUIDs. This also simplifies code that uses this field, since it's usually constructed from a, used as a, or compared to other, strings. Note: A simplistic approach here would be to set uuid_str[36]=0 whenever a /PARTNROFF option was found to be present. However, this modifies the input string, and causes subsequent calls to devt_from_partuuid() not to see the /PARTNROFF option, which causes different results. In order to avoid misleading future maintainers, this parameter is marked const. Signed-off-by: Stephen Warren <swarren@nvidia.com> Cc: Tejun Heo <tj@kernel.org> Cc: Will Drewry <wad@chromium.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r--include/linux/genhd.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 4f440b3e89fe..79b8bba19363 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -88,10 +88,14 @@ struct disk_stats {
88}; 88};
89 89
90#define PARTITION_META_INFO_VOLNAMELTH 64 90#define PARTITION_META_INFO_VOLNAMELTH 64
91#define PARTITION_META_INFO_UUIDLTH 16 91/*
92 * Enough for the string representation of any kind of UUID plus NULL.
93 * EFI UUID is 36 characters. MSDOS UUID is 11 characters.
94 */
95#define PARTITION_META_INFO_UUIDLTH 37
92 96
93struct partition_meta_info { 97struct partition_meta_info {
94 u8 uuid[PARTITION_META_INFO_UUIDLTH]; /* always big endian */ 98 char uuid[PARTITION_META_INFO_UUIDLTH];
95 u8 volname[PARTITION_META_INFO_VOLNAMELTH]; 99 u8 volname[PARTITION_META_INFO_VOLNAMELTH];
96}; 100};
97 101