dcavalca / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone
531551
diff -up util-linux-2.23.2/libblkid/src/partitions/gpt.c.kzak util-linux-2.23.2/libblkid/src/partitions/gpt.c
531551
--- util-linux-2.23.2/libblkid/src/partitions/gpt.c.kzak	2014-09-25 10:36:26.761377688 +0200
531551
+++ util-linux-2.23.2/libblkid/src/partitions/gpt.c	2014-09-25 10:36:56.912665364 +0200
531551
@@ -332,7 +332,7 @@ static int probe_gpt_pt(blkid_probe pr,
531551
 
531551
 	blkid_probe_use_wiper(pr, lba * blkid_probe_get_size(pr), 8);
531551
 
531551
-	if (blkid_probe_set_magic(pr, lba << 9,
531551
+	if (blkid_probe_set_magic(pr, blkid_probe_get_sectorsize(pr) * lba,
531551
 			      sizeof(GPT_HEADER_SIGNATURE_STR) - 1,
531551
 			      (unsigned char *) GPT_HEADER_SIGNATURE_STR))
531551
 		goto err;
531551
@@ -345,7 +345,8 @@ static int probe_gpt_pt(blkid_probe pr,
531551
 	if (!ls)
531551
 		goto err;
531551
 
531551
-	tab = blkid_partlist_new_parttable(ls, "gpt", lba << 9);
531551
+	tab = blkid_partlist_new_parttable(ls, "gpt",
531551
+				blkid_probe_get_sectorsize(pr) * lba);
531551
 	if (!tab)
531551
 		goto err;
531551