summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 39c7a26)
raw | patch | inline | side by side (parent: 39c7a26)
author | Stephen Warren <swarren@nvidia.com> | |
Wed, 10 Oct 2012 07:57:51 +0000 (07:57 +0000) | ||
committer | Tom Rini <trini@ti.com> | |
Fri, 19 Oct 2012 20:42:33 +0000 (13:42 -0700) |
When get_device_and_partition() finds a disk without a partition table,
under some conditions, it "returns" a disk_partition_t that describes
the entire raw disk. Make sure to initialize all fields in the partition
descriptor in that case.
The value chosen for name is just some arbitrary descriptive string.
The value chosen for info matches the check at the end of
get_device_and_partition(). However, it's probably not that important;
it's not obvious that the value is really used.
Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Tom Rini <trini@ti.com>
under some conditions, it "returns" a disk_partition_t that describes
the entire raw disk. Make sure to initialize all fields in the partition
descriptor in that case.
The value chosen for name is just some arbitrary descriptive string.
The value chosen for info matches the check at the end of
get_device_and_partition(). However, it's probably not that important;
it's not obvious that the value is really used.
Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Tom Rini <trini@ti.com>
disk/part.c | patch | blob | history |
diff --git a/disk/part.c b/disk/part.c
index a0c77ddc9d52161270ff437a6ffafd22f1c445d2..8ba3cdeaa026a119e04dffe094bb4f536cc31384 100644 (file)
--- a/disk/part.c
+++ b/disk/part.c
info->size = (*dev_desc)->lba;
info->blksz = (*dev_desc)->blksz;
info->bootable = 0;
+ strcpy((char *)info->type, BOOT_PART_TYPE);
+ strcpy((char *)info->name, "Whole Disk");
#ifdef CONFIG_PARTITION_UUIDS
info->uuid[0] = 0;
#endif