]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Use ULL for all size constants
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 10 Nov 2022 10:03:15 +0000 (11:03 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 11 Nov 2022 12:49:50 +0000 (13:49 +0100)
src/partition/repart.c

index 75a5daf836b75ab5ad6ebe456e7dbf72486889ca..1b24e3ff953de2f9245c2b457a0ecc9180139806 100644 (file)
 #include "utf8.h"
 
 /* If not configured otherwise use a minimal partition size of 10M */
-#define DEFAULT_MIN_SIZE (10*1024*1024)
+#define DEFAULT_MIN_SIZE (10ULL*1024ULL*1024ULL)
 
 /* Hard lower limit for new partition sizes */
-#define HARD_MIN_SIZE 4096
+#define HARD_MIN_SIZE 4096ULL
 
 /* We know up front we're never going to put more than this in a verity sig partition. */
-#define VERITY_SIG_SIZE (HARD_MIN_SIZE * 4)
+#define VERITY_SIG_SIZE (HARD_MIN_SIZE*4ULL)
 
 /* libfdisk takes off slightly more than 1M of the disk size when creating a GPT disk label */
-#define GPT_METADATA_SIZE (1044*1024)
+#define GPT_METADATA_SIZE (1044ULL*1024ULL)
 
 /* LUKS2 takes off 16M of the partition size with its metadata by default */
-#define LUKS2_METADATA_SIZE (16*1024*1024)
+#define LUKS2_METADATA_SIZE (16ULL*1024ULL*1024ULL)
 
 /* Note: When growing and placing new partitions we always align to 4K sector size. It's how newer hard disks
  * are designed, and if everything is aligned to that performance is best. And for older hard disks with 512B