Use KiB MiB GiB instead of Kb Mb Gb
This commit is contained in:
parent
1881cc846a
commit
0fdc53711f
@ -1,4 +1,4 @@
|
|||||||
.\" $NetBSD: newfs_udf.8,v 1.4 2008/07/26 20:20:56 reinoud Exp $
|
.\" $NetBSD: newfs_udf.8,v 1.5 2009/01/18 00:21:09 lukem Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2008 Reinoud Zandijk
|
.\" Copyright (c) 2008 Reinoud Zandijk
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
@ -26,7 +26,7 @@
|
|||||||
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\"
|
.\"
|
||||||
.Dd July 26, 2008
|
.Dd January 18, 2009
|
||||||
.Dt NEWFS_UDF 8
|
.Dt NEWFS_UDF 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -131,7 +131,7 @@ vnconfig -c vnd0 bigdisk.2048.udf 2048/1/1/1
|
|||||||
newfs_udf -L bigdisk /dev/rvnd0d
|
newfs_udf -L bigdisk /dev/rvnd0d
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
Create a 4.8 Gb sparse file and configure it using
|
Create a 4.8 GiB sparse file and configure it using
|
||||||
.Xr vnconfig 8
|
.Xr vnconfig 8
|
||||||
to be a 2048 sector size disc and create a new UDF file system on
|
to be a 2048 sector size disc and create a new UDF file system on
|
||||||
.Pa /dev/rvnd0d .
|
.Pa /dev/rvnd0d .
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: newfs_udf.c,v 1.6 2009/01/18 00:18:41 lukem Exp $ */
|
/* $NetBSD: newfs_udf.c,v 1.7 2009/01/18 00:21:09 lukem Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2008 Reinoud Zandijk
|
* Copyright (c) 2006, 2008 Reinoud Zandijk
|
||||||
@ -1016,7 +1016,7 @@ udf_do_newfs(void)
|
|||||||
wrtrack_skew = ti.track_start % blockingnr;
|
wrtrack_skew = ti.track_start % blockingnr;
|
||||||
|
|
||||||
if (mmc_discinfo.mmc_class == MMC_CLASS_CD) {
|
if (mmc_discinfo.mmc_class == MMC_CLASS_CD) {
|
||||||
/* not too much for CD-RW, still 20Mb */
|
/* not too much for CD-RW, still 20MiB */
|
||||||
sparable_blocks = 32;
|
sparable_blocks = 32;
|
||||||
} else {
|
} else {
|
||||||
/* take a value for DVD*RW mainly, BD is `defect free' */
|
/* take a value for DVD*RW mainly, BD is `defect free' */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: udf_create.c,v 1.13 2009/01/18 00:18:41 lukem Exp $ */
|
/* $NetBSD: udf_create.c,v 1.14 2009/01/18 00:21:09 lukem Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2008 Reinoud Zandijk
|
* Copyright (c) 2006, 2008 Reinoud Zandijk
|
||||||
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
__RCSID("$NetBSD: udf_create.c,v 1.13 2009/01/18 00:18:41 lukem Exp $");
|
__RCSID("$NetBSD: udf_create.c,v 1.14 2009/01/18 00:21:09 lukem Exp $");
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -310,7 +310,7 @@ udf_calculate_disc_layout(int format_flags, int min_udf,
|
|||||||
printf("\tsparable\t\t%d\n", layout.sparable_area);
|
printf("\tsparable\t\t%d\n", layout.sparable_area);
|
||||||
}
|
}
|
||||||
printf("\tpartion start lba\t%d\n", layout.part_start_lba);
|
printf("\tpartion start lba\t%d\n", layout.part_start_lba);
|
||||||
printf("\tpartition size\t\t%d Kb, %d Mb\n",
|
printf("\tpartition size\t\t%d KiB, %d MiB\n",
|
||||||
(layout.part_size_lba * sector_size) / 1024,
|
(layout.part_size_lba * sector_size) / 1024,
|
||||||
(layout.part_size_lba * sector_size) / (1024*1024));
|
(layout.part_size_lba * sector_size) / (1024*1024));
|
||||||
if ((format_flags & FORMAT_SEQUENTIAL) == 0) {
|
if ((format_flags & FORMAT_SEQUENTIAL) == 0) {
|
||||||
@ -320,7 +320,7 @@ udf_calculate_disc_layout(int format_flags, int min_udf,
|
|||||||
if (format_flags & FORMAT_META) {
|
if (format_flags & FORMAT_META) {
|
||||||
printf("\tmeta blockingnr\t\t%d\n", layout.meta_blockingnr);
|
printf("\tmeta blockingnr\t\t%d\n", layout.meta_blockingnr);
|
||||||
printf("\tmeta alignment\t\t%d\n", layout.meta_alignment);
|
printf("\tmeta alignment\t\t%d\n", layout.meta_alignment);
|
||||||
printf("\tmeta size\t\t%d Kb, %d Mb\n",
|
printf("\tmeta size\t\t%d KiB, %d MiB\n",
|
||||||
(layout.meta_part_size_lba * sector_size) / 1024,
|
(layout.meta_part_size_lba * sector_size) / 1024,
|
||||||
(layout.meta_part_size_lba * sector_size) / (1024*1024));
|
(layout.meta_part_size_lba * sector_size) / (1024*1024));
|
||||||
printf("\tmeta file\t\t%d\n", layout.meta_file);
|
printf("\tmeta file\t\t%d\n", layout.meta_file);
|
||||||
@ -335,11 +335,11 @@ udf_calculate_disc_layout(int format_flags, int min_udf,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
kbsize = (uint64_t) last_lba * sector_size;
|
kbsize = (uint64_t) last_lba * sector_size;
|
||||||
printf("Total space on this medium aprox. %"PRIu64" Kb, %"PRIu64" Mb\n",
|
printf("Total space on this medium aprox. %"PRIu64" KiB, %"PRIu64" MiB\n",
|
||||||
kbsize/1024, kbsize/(1024*1024));
|
kbsize/1024, kbsize/(1024*1024));
|
||||||
kbsize = (uint64_t) (layout.part_size_lba - layout.alloc_bitmap_dscr_size
|
kbsize = (uint64_t) (layout.part_size_lba - layout.alloc_bitmap_dscr_size
|
||||||
- layout.meta_bitmap_dscr_size) * sector_size;
|
- layout.meta_bitmap_dscr_size) * sector_size;
|
||||||
printf("Free space on this volume aprox. %"PRIu64" Kb, %"PRIu64" Mb\n\n",
|
printf("Free space on this volume aprox. %"PRIu64" KiB, %"PRIu64" MiB\n\n",
|
||||||
kbsize/1024, kbsize/(1024*1024));
|
kbsize/1024, kbsize/(1024*1024));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user