Project

General

Profile

0006-disklabel64-8-Update-displayed-label-comments-and-an.patch

liweitianux, 11/08/2017 07:07 AM

Download (2.23 KB)

View differences:

sbin/disklabel64/disklabel64.c
639 639

  
640 640
	fprintf(f, "# %s:\n", specname);
641 641
	fprintf(f, "#\n");
642
	fprintf(f, "# Informational fields calculated from the above\n");
643
	fprintf(f, "# All byte equivalent offsets must be aligned\n");
642
	fprintf(f, "# Calculated informational fields for the slice:\n");
644 643
	fprintf(f, "#\n");
645 644
	fprintf(f, "# boot space: %10ju bytes\n",
646 645
		(intmax_t)(lp->d_pbase - lp->d_bbase));
......
649 648
			(double)(lp->d_pstop - lp->d_pbase) / 1024.0 / 1024.0,
650 649
			(intmax_t)(lp->d_pstop - lp->d_pbase));
651 650
	fprintf(f, "#\n");
652
	fprintf(f, "# NOTE: If the partition data base looks odd it may be\n");
653
	fprintf(f, "#       physically aligned instead of slice-aligned\n");
651
	fprintf(f, "# NOTE: The partition data base and stop are physically\n");
652
	fprintf(f, "#       aligned instead of slice-relative aligned.\n");
653
	fprintf(f, "#\n");
654
	fprintf(f, "# All byte equivalent offsets must be aligned.\n");
654 655
	fprintf(f, "#\n");
655 656

  
656 657
	uuid_to_string(&lp->d_stor_uuid, &str, NULL);
......
667 668
		(intmax_t)lp->d_total_size,
668 669
		(double)lp->d_total_size / 1024.0 / 1024.0);
669 670
	fprintf(f, "alignment: %u\n", lp->d_align);
670
	fprintf(f, "display block size: %u\t# for partition display only\n",
671
	fprintf(f, "display block size: %u\t# for partition display and edit only\n",
671 672
		blksize);
672 673

  
673 674
	fprintf(f, "\n");
......
1471 1472
	}
1472 1473

  
1473 1474
	/*
1474
	 * Try to use the new get-virgin-label ioctl.  If it fails,
1475
	 * fallback to the old get-disk-info ioctl.
1475
	 * Generate a virgin disklabel via ioctl
1476 1476
	 */
1477 1477
	if (ioctl(f, DIOCGDVIRGIN64, dl) < 0) {
1478 1478
		l_perror("ioctl DIOCGDVIRGIN64");
1479
-