diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2015-09-30 10:26:35 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2015-09-30 13:23:49 +0800 |
commit | 9e0b6b31c9bb5ce3ad72756c918f02e6e909c737 (patch) | |
tree | d21f1ee1b153a6903bb2cd05e414cf87c5170f36 /discover/device-handler.h | |
parent | 519d84fe21d48fe277ef5cc65d29839f86b4e1a0 (diff) | |
download | talos-petitboot-9e0b6b31c9bb5ce3ad72756c918f02e6e909c737.tar.gz talos-petitboot-9e0b6b31c9bb5ce3ad72756c918f02e6e909c737.zip |
discover/devmapper: Use explicit 64-bit types for sector counts
We currently have a bug where the return value from get_block_sectors
may overflow an unsigned int, so we create a snapshot that is too small.
This change uses uint64_t types for the sector counts.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/device-handler.h')
-rw-r--r-- | discover/device-handler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discover/device-handler.h b/discover/device-handler.h index 5877733..d18910a 100644 --- a/discover/device-handler.h +++ b/discover/device-handler.h @@ -65,7 +65,7 @@ struct ramdisk_device { char *snapshot; char *origin; char *base; - unsigned int sectors; + uint64_t sectors; }; struct device_handler *device_handler_init(struct discover_server *server, |