From 707e509a1e1d79fb387c3480fd8a67d40e4e2db7 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 16 Mar 2004 17:07:06 +0000 Subject: Change libdisk and sysinstall to use d_addr_t rather than u_long for disk addresses. For arch's with 64-bit longs, this is a nop, but for i386 this allows sysinstall to properly handle disks and filesystems > 1 TB. Changes from the original patch include: - Use d_addr_t rather than inventing a blkcnt type based on int64_t. - Use strtoimax() rather than strtoull() to parse d_addr_t's from config files. - Use intmax_t casts and %jd rather than %llu to printf d_addr_t values. Tested on: i386 Tested by: kuriyama Submitted by: julian MFC after: 1 month --- lib/libdisk/libdisk.3 | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'lib/libdisk/libdisk.3') diff --git a/lib/libdisk/libdisk.3 b/lib/libdisk/libdisk.3 index 6d088b3f5b44..341bb4f51a27 100644 --- a/lib/libdisk/libdisk.3 +++ b/lib/libdisk/libdisk.3 @@ -79,7 +79,7 @@ .Ft int .Fn Collapse_Chunk "struct disk *disk" "struct chunk *chunk" .Ft int -.Fn Create_Chunk "struct disk *disk" "u_long offset" "u_long size" "chunk_e type" "int subtype" "u_long flags" +.Fn Create_Chunk "struct disk *disk" "daddr_t offset" "daddr_t size" "chunk_e type" "int subtype" "u_long flags" .Ft void .Fn All_FreeBSD "struct disk *d" "int force_all" .Ft char * @@ -93,19 +93,19 @@ .Ft int .Fn Write_Disk "struct disk *d" .Ft int -.Fn Cyl_Aligned "struct disk *d" "u_long offset" -.Ft u_long -.Fn Next_Cyl_Aligned "struct disk *d" "u_long offset" -.Ft u_long -.Fn Prev_Cyl_Aligned "struct disk *d" "u_long offset" +.Fn Cyl_Aligned "struct disk *d" "daddr_t offset" +.Ft daddr_t +.Fn Next_Cyl_Aligned "struct disk *d" "daddr_t offset" +.Ft daddr_t +.Fn Prev_Cyl_Aligned "struct disk *d" "daddr_t offset" .Ft int -.Fn Track_Aligned "struct disk *d" "u_long offset" -.Ft u_long -.Fn Next_Track_Aligned "struct disk *d" "u_long offset" -.Ft u_long -.Fn Prev_Track_Aligned "struct disk *d" "u_long offset" +.Fn Track_Aligned "struct disk *d" "daddr_t offset" +.Ft daddr_t +.Fn Next_Track_Aligned "struct disk *d" "daddr_t offset" +.Ft daddr_t +.Fn Prev_Track_Aligned "struct disk *d" "daddr_t offset" .Ft struct chunk * -.Fn Create_Chunk_DWIM "struct disk *d" "struct chunk *parent" "u_long size" "chunk_e type" "int subtype" "u_long flags" +.Fn Create_Chunk_DWIM "struct disk *d" "struct chunk *parent" "daddr_t size" "chunk_e type" "int subtype" "u_long flags" .Ft int .Fn MakeDev "struct chunk *c" "const char *path" .Ft int @@ -150,9 +150,9 @@ struct chunk { struct chunk *next; struct chunk *part; struct disk *disk; - long offset; - u_long size; - u_long end; + daddr_t offset; + daddr_t size; + daddr_t end; char *name; char *oname; chunk_e type; -- cgit v1.3