Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 252927 Details for
Bug 343877
sys-block/gpart-0.1h-r2 doesn't read partition tables properly on amd64
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Possible fix for amd64
gpart-0.1h-amd64.patch (text/plain), 2.26 KB, created by
Ian Abbott
on 2010-11-02 18:07:37 UTC
(
hide
)
Description:
Possible fix for amd64
Filename:
MIME Type:
Creator:
Ian Abbott
Created:
2010-11-02 18:07:37 UTC
Size:
2.26 KB
patch
obsolete
>diff -urp gpart-0.1h.orig/src/gpart.h gpart-0.1h/src/gpart.h >--- gpart-0.1h.orig/src/gpart.h 2001-01-30 23:07:29.000000000 +0000 >+++ gpart-0.1h/src/gpart.h 2010-11-02 17:28:34.000000000 +0000 >@@ -19,6 +19,7 @@ > > #include "errmsgs.h" > #include "l64seek.h" >+#include <endian.h> > > #define PROGRAM "gpart" > >@@ -31,44 +32,12 @@ typedef unsigned char byte_t; > * endianness (incomplete, later) > */ > >-#if defined(__i386__) || defined(__alpha__) >-# define le16(x) (x) /* x as little endian */ >-# define be16(x) ((((x)&0xff00)>>8) | \ >- (((x)&0x00ff)<<8)) >-# define le32(x) (x) >-# define be32(x) ((((x)&0xff000000L)>>24) | \ >- (((x)&0x00ff0000L)>>8) | \ >- (((x)&0x0000ff00L)<<8) | \ >- (((x)&0x000000ffL)<<24)) >-# define le64(x) (x) >-# define be64(x) ((((x)&0xff00000000000000LL)>>56) | \ >- (((x)&0x00ff000000000000LL)>>40) | \ >- (((x)&0x0000ff0000000000LL)>>24) | \ >- (((x)&0x000000ff00000000LL)>>8) | \ >- (((x)&0x00000000ff000000LL)<<8) | \ >- (((x)&0x0000000000ff0000LL)<<24) | \ >- (((x)&0x000000000000ff00LL)<<40) | \ >- (((x)&0x00000000000000ffLL)<<56)) >-#else /* bigendian */ >-# define le16(x) ((((x)&0xff00)>>8) | \ >- (((x)&0x00ff)<<8)) >-# define be16(x) (x) >-# define le32(x) ((((x)&0xff000000L)>>24) | \ >- (((x)&0x00ff0000L)>>8) | \ >- (((x)&0x0000ff00L)<<8) | \ >- (((x)&0x000000ffL)<<24)) >-# define be32(x) (x) >-# define le64(x) ((((x)&0xff00000000000000LL)>>56) | \ >- (((x)&0x00ff000000000000LL)>>40) | \ >- (((x)&0x0000ff0000000000LL)>>24) | \ >- (((x)&0x000000ff00000000LL)>>8) | \ >- (((x)&0x00000000ff000000LL)<<8) | \ >- (((x)&0x0000000000ff0000LL)<<24) | \ >- (((x)&0x000000000000ff00LL)<<40) | \ >- (((x)&0x00000000000000ffLL)<<56)) >-# define be64(x) (x) >-#endif >- >+#define le16(x) le16toh(x) >+#define be16(x) be16toh(x) >+#define le32(x) le32toh(x) >+#define be32(x) be32toh(x) >+#define le64(x) le64toh(x) >+#define be64(x) be64toh(x) > > #ifndef max > # define max(a,b) ((a)>(b)?(a):(b)) >@@ -112,8 +81,8 @@ typedef struct > 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 */ >+ unsigned int p_start; /* start sector (absolute) */ >+ unsigned int p_size; /* # of sectors */ > } dos_part_entry; > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 343877
: 252927 |
264349