diff options
author | Matthias Andree <mandree@FreeBSD.org> | 2011-03-17 00:18:20 +0000 |
---|---|---|
committer | Matthias Andree <mandree@FreeBSD.org> | 2011-03-17 00:18:20 +0000 |
commit | b306a66296866b8bc366f162e5f9f95da9c9d726 (patch) | |
tree | 8a7cb70b4843bd98c6790d43bde4d4baeb7a6b2c /sysutils/gpart | |
parent | 041e9a576fc982ab7ce59d66c78fe34ce5a2c1a1 (diff) | |
download | ports-b306a66296866b8bc366f162e5f9f95da9c9d726.tar.gz ports-b306a66296866b8bc366f162e5f9f95da9c9d726.zip |
Notes
Diffstat (limited to 'sysutils/gpart')
-rw-r--r-- | sysutils/gpart/files/patch-af | 96 | ||||
-rw-r--r-- | sysutils/gpart/files/patch-inst.defs (renamed from sysutils/gpart/files/patch-aa) | 4 | ||||
-rw-r--r-- | sysutils/gpart/files/patch-make.defs (renamed from sysutils/gpart/files/patch-ab) | 4 | ||||
-rw-r--r-- | sysutils/gpart/files/patch-man__gpart.man (renamed from sysutils/gpart/files/patch-ad) | 4 | ||||
-rw-r--r-- | sysutils/gpart/files/patch-src__disku.c (renamed from sysutils/gpart/files/patch-ac) | 27 | ||||
-rw-r--r-- | sysutils/gpart/files/patch-src__gm_bsddl.h | 11 | ||||
-rw-r--r-- | sysutils/gpart/files/patch-src__gm_ntfs.h (renamed from sysutils/gpart/files/patch-ae) | 4 | ||||
-rw-r--r-- | sysutils/gpart/files/patch-src__gpart.h | 42 |
8 files changed, 79 insertions, 113 deletions
diff --git a/sysutils/gpart/files/patch-af b/sysutils/gpart/files/patch-af deleted file mode 100644 index 9a556af18c2b..000000000000 --- a/sysutils/gpart/files/patch-af +++ /dev/null @@ -1,96 +0,0 @@ ---- src/disku.c 2011-03-17 00:53:37.000000000 +0100 -+++ src/disku.c 2011-03-17 00:17:34.000000000 +0100 -@@ -75,25 +75,34 @@ - #else - struct disklabel loclab; - u_int u; -+ off_t o; /* total disk size */ - - if (ioctl(d->d_fd, DIOCGFWSECTORS, &u) == 0) -- loclab.d_nsectors = u; -+ g.d_s = u; - else -- loclab.d_nsectors = 63; -+ pr(FATAL, EM_IOCTLFAILED, "DIOCGFWSECTORS", strerror(errno)); -+ // loclab.d_nsectors = 63; - if (ioctl(d->d_fd, DIOCGFWHEADS, &u) == 0) -- loclab.d_ntracks = u; -+ g.d_h = u; -+ else -+ pr(FATAL, EM_IOCTLFAILED, "DIOCGFWHEADS", strerror(errno)); -+#if 0 - else if (loclab.d_secperunit <= 63*1*1024) - loclab.d_ntracks = 1; - else if (loclab.d_secperunit <= 63*16*1024) - loclab.d_ntracks = 16; - else - loclab.d_ntracks = 255; -+#endif -+ if (ioctl(d->d_fd, DIOCGSECTORSIZE, &u) == 0) -+ if (u != 512) -+ pr(FATAL, "sector size not a multiple of 512"); -+ if (ioctl(d->d_fd, DIOCGMEDIASIZE, &o)) -+ pr(FATAL, EM_IOCTLFAILED, "DIOCGMEDIASIZE", strerror(errno)); - loclab.d_secpercyl = loclab.d_ntracks * loclab.d_nsectors; - loclab.d_ncylinders = loclab.d_secperunit / loclab.d_secpercyl; - -- g.d_c = loclab.d_ncylinders; -- g.d_h = loclab.d_ntracks; -- g.d_s = loclab.d_nsectors; -+ g.d_c = o / u / g.d_h / g.d_s; // loclab.d_ncylinders; - #endif - #endif - ---- src/gm_bsddl.h 2000-12-13 23:54:31.000000000 +0100 -+++ src/gm_bsddl.h 2011-03-17 00:38:12.000000000 +0100 -@@ -28,7 +28,7 @@ - - #define BBSIZE 8192 /* size of boot area, with label */ - --#ifdef __i386__ -+#if defined(__i386__) || defined(__amd64__) - #define LABELSECTOR 1 /* sector containing label */ - #define LABELOFFSET 0 /* offset of label in sector */ - #endif ---- src/gpart.h 2001-01-31 00:07:29.000000000 +0100 -+++ src/gpart.h 2011-03-17 00:35:27.000000000 +0100 -@@ -22,8 +22,9 @@ - - #define PROGRAM "gpart" - -+#include <stdint.h> - --typedef unsigned char byte_t; -+typedef uint8_t byte_t; - - - -@@ -31,7 +32,7 @@ - * endianness (incomplete, later) - */ - --#if defined(__i386__) || defined(__alpha__) -+#if defined(__i386__) || defined(__amd64__) || defined(__alpha__) - # define le16(x) (x) /* x as little endian */ - # define be16(x) ((((x)&0xff00)>>8) | \ - (((x)&0x00ff)<<8)) -@@ -112,8 +113,8 @@ - byte_t p_ehd; /* end head */ - byte_t p_esect; /* end sector */ - byte_t p_ecyl; /* end cylinder */ -- unsigned long p_start; /* start sector (absolute) */ -- unsigned long p_size; /* # of sectors */ -+ uint32_t p_start; /* start sector (absolute) */ -+ uint32_t p_size; /* # of sectors */ - } dos_part_entry; - - -@@ -123,7 +124,7 @@ - byte_t _align[2]; - byte_t t_boot[DOSPARTOFF]; - dos_part_entry t_parts[NDOSPARTS]; -- unsigned short t_magic; /* DOSPTMAGIC */ -+ uint16_t t_magic; /* DOSPTMAGIC */ - } dos_part_table; - - diff --git a/sysutils/gpart/files/patch-aa b/sysutils/gpart/files/patch-inst.defs index 9d1c9ed1bc8c..cb69167258d3 100644 --- a/sysutils/gpart/files/patch-aa +++ b/sysutils/gpart/files/patch-inst.defs @@ -1,5 +1,5 @@ ---- inst.defs.orig Sun May 14 21:04:24 2000 -+++ inst.defs Sat Sep 16 17:41:38 2000 +--- ./inst.defs.orig 2000-12-13 23:45:49.000000000 +0100 ++++ ./inst.defs 2011-03-17 01:15:54.000000000 +0100 @@ -1,8 +1,8 @@ # # installation directories for gpart diff --git a/sysutils/gpart/files/patch-ab b/sysutils/gpart/files/patch-make.defs index 20316437393e..9468e5c82f3d 100644 --- a/sysutils/gpart/files/patch-ab +++ b/sysutils/gpart/files/patch-make.defs @@ -1,5 +1,5 @@ ---- make.defs.orig Sun May 14 21:07:18 2000 -+++ make.defs Sat Sep 16 17:44:32 2000 +--- ./make.defs.orig 2001-01-29 20:17:12.000000000 +0100 ++++ ./make.defs 2011-03-17 01:15:54.000000000 +0100 @@ -1,10 +1,10 @@ # # diff --git a/sysutils/gpart/files/patch-ad b/sysutils/gpart/files/patch-man__gpart.man index 3c7561d21846..845d168fc756 100644 --- a/sysutils/gpart/files/patch-ad +++ b/sysutils/gpart/files/patch-man__gpart.man @@ -1,5 +1,5 @@ ---- man/gpart.man.orig Sat Oct 4 04:34:37 2003 -+++ man/gpart.man Sat Oct 4 04:34:43 2003 +--- ./man/gpart.man.orig 2001-02-07 18:54:18.000000000 +0100 ++++ ./man/gpart.man 2011-03-17 01:15:54.000000000 +0100 @@ -378,7 +378,7 @@ drive without starting the scan loop in FreeBSD type diff --git a/sysutils/gpart/files/patch-ac b/sysutils/gpart/files/patch-src__disku.c index a9e542ecfdd7..3dff944bc3e3 100644 --- a/sysutils/gpart/files/patch-ac +++ b/sysutils/gpart/files/patch-src__disku.c @@ -1,5 +1,5 @@ ---- src/disku.c.orig Sat Oct 4 04:33:32 2003 -+++ src/disku.c Sat Oct 4 04:33:38 2003 +--- ./src/disku.c.orig 2001-02-07 20:04:07.000000000 +0100 ++++ ./src/disku.c 2011-03-17 01:15:54.000000000 +0100 @@ -28,7 +28,11 @@ #if defined(__FreeBSD__) @@ -12,7 +12,7 @@ #endif -@@ -61,12 +65,36 @@ +@@ -61,12 +65,45 @@ #endif #if defined(__FreeBSD__) @@ -26,25 +26,34 @@ +#else + struct disklabel loclab; + u_int u; ++ off_t o; /* total disk size */ + + if (ioctl(d->d_fd, DIOCGFWSECTORS, &u) == 0) -+ loclab.d_nsectors = u; ++ g.d_s = u; + else -+ loclab.d_nsectors = 63; ++ pr(FATAL, EM_IOCTLFAILED, "DIOCGFWSECTORS", strerror(errno)); ++ // loclab.d_nsectors = 63; + if (ioctl(d->d_fd, DIOCGFWHEADS, &u) == 0) -+ loclab.d_ntracks = u; ++ g.d_h = u; ++ else ++ pr(FATAL, EM_IOCTLFAILED, "DIOCGFWHEADS", strerror(errno)); ++#if 0 + else if (loclab.d_secperunit <= 63*1*1024) + loclab.d_ntracks = 1; + else if (loclab.d_secperunit <= 63*16*1024) + loclab.d_ntracks = 16; + else + loclab.d_ntracks = 255; ++#endif ++ if (ioctl(d->d_fd, DIOCGSECTORSIZE, &u) == 0) ++ if (u != 512) ++ pr(FATAL, "sector size not a multiple of 512"); ++ if (ioctl(d->d_fd, DIOCGMEDIASIZE, &o)) ++ pr(FATAL, EM_IOCTLFAILED, "DIOCGMEDIASIZE", strerror(errno)); + loclab.d_secpercyl = loclab.d_ntracks * loclab.d_nsectors; + loclab.d_ncylinders = loclab.d_secperunit / loclab.d_secpercyl; + -+ g.d_c = loclab.d_ncylinders; -+ g.d_h = loclab.d_ntracks; -+ g.d_s = loclab.d_nsectors; ++ g.d_c = o / u / g.d_h / g.d_s; // loclab.d_ncylinders; +#endif #endif diff --git a/sysutils/gpart/files/patch-src__gm_bsddl.h b/sysutils/gpart/files/patch-src__gm_bsddl.h new file mode 100644 index 000000000000..c1179a38a618 --- /dev/null +++ b/sysutils/gpart/files/patch-src__gm_bsddl.h @@ -0,0 +1,11 @@ +--- ./src/gm_bsddl.h.orig 2000-12-13 23:54:31.000000000 +0100 ++++ ./src/gm_bsddl.h 2011-03-17 01:15:54.000000000 +0100 +@@ -28,7 +28,7 @@ + + #define BBSIZE 8192 /* size of boot area, with label */ + +-#ifdef __i386__ ++#if defined(__i386__) || defined(__amd64__) + #define LABELSECTOR 1 /* sector containing label */ + #define LABELOFFSET 0 /* offset of label in sector */ + #endif diff --git a/sysutils/gpart/files/patch-ae b/sysutils/gpart/files/patch-src__gm_ntfs.h index c4deb1bcf492..af5e4ea2fa4a 100644 --- a/sysutils/gpart/files/patch-ae +++ b/sysutils/gpart/files/patch-src__gm_ntfs.h @@ -1,5 +1,5 @@ ---- src/gm_ntfs.h~ 2001-01-29 21:33:58.000000000 +0100 -+++ src/gm_ntfs.h 2011-03-16 23:25:34.000000000 +0100 +--- ./src/gm_ntfs.h.orig 2001-01-29 21:33:58.000000000 +0100 ++++ ./src/gm_ntfs.h 2011-03-17 01:15:54.000000000 +0100 @@ -29,17 +29,16 @@ /* 'NTFS' in little endian */ #define NTFS_SUPER_MAGIC 0x5346544E diff --git a/sysutils/gpart/files/patch-src__gpart.h b/sysutils/gpart/files/patch-src__gpart.h new file mode 100644 index 000000000000..07771ea1c33a --- /dev/null +++ b/sysutils/gpart/files/patch-src__gpart.h @@ -0,0 +1,42 @@ +--- ./src/gpart.h.orig 2001-01-31 00:07:29.000000000 +0100 ++++ ./src/gpart.h 2011-03-17 01:15:54.000000000 +0100 +@@ -22,8 +22,9 @@ + + #define PROGRAM "gpart" + ++#include <stdint.h> + +-typedef unsigned char byte_t; ++typedef uint8_t byte_t; + + + +@@ -31,7 +32,7 @@ + * endianness (incomplete, later) + */ + +-#if defined(__i386__) || defined(__alpha__) ++#if defined(__i386__) || defined(__amd64__) || defined(__alpha__) + # define le16(x) (x) /* x as little endian */ + # define be16(x) ((((x)&0xff00)>>8) | \ + (((x)&0x00ff)<<8)) +@@ -112,8 +113,8 @@ + byte_t p_ehd; /* end head */ + byte_t p_esect; /* end sector */ + byte_t p_ecyl; /* end cylinder */ +- unsigned long p_start; /* start sector (absolute) */ +- unsigned long p_size; /* # of sectors */ ++ uint32_t p_start; /* start sector (absolute) */ ++ uint32_t p_size; /* # of sectors */ + } dos_part_entry; + + +@@ -123,7 +124,7 @@ + byte_t _align[2]; + byte_t t_boot[DOSPARTOFF]; + dos_part_entry t_parts[NDOSPARTS]; +- unsigned short t_magic; /* DOSPTMAGIC */ ++ uint16_t t_magic; /* DOSPTMAGIC */ + } dos_part_table; + + |