summaryrefslogtreecommitdiff
path: root/extra/gpart
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-01-01 16:37:20 -0300
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-01-01 16:37:20 -0300
commit6124dfa10e2a69fc79efc85f611c8db582caf711 (patch)
treee9706ae64164967e8448140e9cb6534dfbb0a2a3 /extra/gpart
parent385fda403f286573a778ee525fe56a86d11fc967 (diff)
parent5a81550adad5ccde4ad6924cfee2b2ef96d02c98 (diff)
Merge branch 'master' of gparabola:abslibre/abslibre-pre-mips64el
Conflicts: community/almanah/PKGBUILD community/audit/PKGBUILD community/bird/PKGBUILD community/blobby2/PKGBUILD community/blueman/PKGBUILD community/bomberclone/PKGBUILD community/botan/PKGBUILD community/cantata/PKGBUILD community/cinnamon-desktop/PKGBUILD community/cinnamon-settings-daemon/PKGBUILD community/cinnamon/PKGBUILD community/clearsilver/PKGBUILD community/clinica/PKGBUILD community/confuse/PKGBUILD community/deadbeef/PKGBUILD community/dvdrtools/PKGBUILD community/etl/PKGBUILD community/extremetuxracer/PKGBUILD community/fcitx-mozc/PKGBUILD community/flashrom/PKGBUILD community/freedroidrpg/PKGBUILD community/gcolor2/PKGBUILD community/geary/PKGBUILD community/glob2/PKGBUILD community/gnash/PKGBUILD community/gnome-commander/PKGBUILD community/gnome-settings-daemon-updates/PKGBUILD community/gnuchess/PKGBUILD community/haskell-bytestring-show/PKGBUILD community/haskell-hslogger/PKGBUILD community/haskell-vector/PKGBUILD community/hedgewars/PKGBUILD community/hitori/PKGBUILD community/inputattach/PKGBUILD community/jack2/PKGBUILD community/kid3/PKGBUILD community/lcdproc/PKGBUILD community/libcec/PKGBUILD community/libvirt/PKGBUILD community/libwww/PKGBUILD community/lightdm/PKGBUILD community/lincity-ng/PKGBUILD community/linux-tools/PKGBUILD community/linuxtv-dvb-apps/PKGBUILD community/lockdev/PKGBUILD community/log4cpp/PKGBUILD community/love/PKGBUILD community/luajit/PKGBUILD community/lxc/PKGBUILD community/metamail/PKGBUILD community/mingw32-binutils/PKGBUILD community/mingw32-gcc/PKGBUILD community/mingw32-pthreads/PKGBUILD community/mongodb/PKGBUILD community/nemo/PKGBUILD community/par2cmdline/PKGBUILD community/pdfedit/PKGBUILD community/perl-json-xs/PKGBUILD community/pidgin-talkfilters/PKGBUILD community/pokerth/PKGBUILD community/setconf/PKGBUILD community/stfl/PKGBUILD community/talkfilters/PKGBUILD community/tre/PKGBUILD community/ubuntuone-client-gnome/PKGBUILD community/ubuntuone-client/PKGBUILD community/vor/PKGBUILD community/warmux/PKGBUILD community/wdm/PKGBUILD community/xbmc-pvr-addons/PKGBUILD core/gcc/PKGBUILD core/lvm2/PKGBUILD core/systemd/PKGBUILD core/sysvinit-tools/PKGBUILD extra/aubio/PKGBUILD extra/avidemux/PKGBUILD extra/bluez4/PKGBUILD extra/boost/PKGBUILD extra/calligra/PKGBUILD extra/caribou/PKGBUILD extra/chemtool/PKGBUILD extra/cinepaint/PKGBUILD extra/conky/PKGBUILD extra/cups/PKGBUILD extra/enlightenment16/PKGBUILD extra/exo/PKGBUILD extra/fakechroot/PKGBUILD extra/farstream-0.1/PKGBUILD extra/ffmpeg-compat/PKGBUILD extra/fltk/PKGBUILD extra/git/PKGBUILD extra/gpart/PKGBUILD extra/gstreamer0.10-base/PKGBUILD extra/gstreamer0.10-ffmpeg/PKGBUILD extra/gstreamer0.10-good/PKGBUILD extra/gstreamer0.10-ugly/PKGBUILD extra/gtk-vnc/PKGBUILD extra/haveged/PKGBUILD extra/icewm/PKGBUILD extra/imagemagick/PKGBUILD extra/kactivities/PKGBUILD extra/kdeaccessibility-jovie/PKGBUILD extra/kdeaccessibility-kaccessible/PKGBUILD extra/kdeaccessibility-kmag/PKGBUILD extra/kdeaccessibility-kmousetool/PKGBUILD extra/kdeaccessibility-kmouth/PKGBUILD extra/kdeadmin-kcron/PKGBUILD extra/kdeadmin-ksystemlog/PKGBUILD extra/kdeadmin-kuser/PKGBUILD extra/kdeartwork/PKGBUILD extra/kdebase-konsole/PKGBUILD extra/kdebase-workspace/PKGBUILD extra/kdebase/PKGBUILD extra/kdebindings-kimono/PKGBUILD extra/kdebindings-korundum/PKGBUILD extra/kdebindings-kross/PKGBUILD extra/kdebindings-perlkde/PKGBUILD extra/kdebindings-perlqt/PKGBUILD extra/kdebindings-python/PKGBUILD extra/kdebindings-qtruby/PKGBUILD extra/kdebindings-qyoto/PKGBUILD extra/kdebindings-smokegen/PKGBUILD extra/kdebindings-smokekde/PKGBUILD extra/kdebindings-smokeqt/PKGBUILD extra/kdeedu-analitza/PKGBUILD extra/kdeedu-blinken/PKGBUILD extra/kdeedu-cantor/PKGBUILD extra/kdeedu-kalgebra/PKGBUILD extra/kdeedu-kalzium/PKGBUILD extra/kdeedu-kanagram/PKGBUILD extra/kdeedu-kbruch/PKGBUILD extra/kdeedu-kgeography/PKGBUILD extra/kdeedu-khangman/PKGBUILD extra/kdeedu-kig/PKGBUILD extra/kdeedu-kiten/PKGBUILD extra/kdeedu-klettres/PKGBUILD extra/kdeedu-kmplot/PKGBUILD extra/kdeedu-kstars/PKGBUILD extra/kdeedu-ktouch/PKGBUILD extra/kdeedu-kturtle/PKGBUILD extra/kdeedu-kwordquiz/PKGBUILD extra/kdeedu-marble/PKGBUILD extra/kdeedu-pairs/PKGBUILD extra/kdeedu-parley/PKGBUILD extra/kdeedu-rocs/PKGBUILD extra/kdeedu-step/PKGBUILD extra/kdegames-bomber/PKGBUILD extra/kdegames-bovo/PKGBUILD extra/kdegames-granatier/PKGBUILD extra/kdegames-kapman/PKGBUILD extra/kdegames-katomic/PKGBUILD extra/kdegames-kblackbox/PKGBUILD extra/kdegames-kblocks/PKGBUILD extra/kdegames-kbounce/PKGBUILD extra/kdegames-kbreakout/PKGBUILD extra/kdegames-kdiamond/PKGBUILD extra/kdegames-kfourinline/PKGBUILD extra/kdegames-kgoldrunner/PKGBUILD extra/kdegames-kigo/PKGBUILD extra/kdegames-killbots/PKGBUILD extra/kdegames-kiriki/PKGBUILD extra/kdegames-kjumpingcube/PKGBUILD extra/kdegames-klickety/PKGBUILD extra/kdegames-klines/PKGBUILD extra/kdegames-kmahjongg/PKGBUILD extra/kdegames-kmines/PKGBUILD extra/kdegames-knavalbattle/PKGBUILD extra/kdegames-knetwalk/PKGBUILD extra/kdegames-kolf/PKGBUILD extra/kdegames-kollision/PKGBUILD extra/kdegames-konquest/PKGBUILD extra/kdegames-kpatience/PKGBUILD extra/kdegames-kreversi/PKGBUILD extra/kdegames-kshisen/PKGBUILD extra/kdegames-ksirk/PKGBUILD extra/kdegames-ksnakeduel/PKGBUILD extra/kdegames-kspaceduel/PKGBUILD extra/kdegames-ksquares/PKGBUILD extra/kdegames-ksudoku/PKGBUILD extra/kdegames-ktuberling/PKGBUILD extra/kdegames-kubrick/PKGBUILD extra/kdegames-lskat/PKGBUILD extra/kdegames-palapeli/PKGBUILD extra/kdegames-picmi/PKGBUILD extra/kdegraphics-gwenview/PKGBUILD extra/kdegraphics-kamera/PKGBUILD extra/kdegraphics-kcolorchooser/PKGBUILD extra/kdegraphics-kgamma/PKGBUILD extra/kdegraphics-kolourpaint/PKGBUILD extra/kdegraphics-kruler/PKGBUILD extra/kdegraphics-ksaneplugin/PKGBUILD extra/kdegraphics-ksnapshot/PKGBUILD extra/kdegraphics-mobipocket/PKGBUILD extra/kdegraphics-okular/PKGBUILD extra/kdegraphics-strigi-analyzer/PKGBUILD extra/kdegraphics-svgpart/PKGBUILD extra/kdegraphics-thumbnailers/PKGBUILD extra/kdemultimedia-audiocd-kio/PKGBUILD extra/kdemultimedia-dragonplayer/PKGBUILD extra/kdemultimedia-ffmpegthumbs/PKGBUILD extra/kdemultimedia-juk/PKGBUILD extra/kdemultimedia-kmix/PKGBUILD extra/kdemultimedia-kscd/PKGBUILD extra/kdemultimedia-mplayerthumbs/PKGBUILD extra/kdenetwork-filesharing/PKGBUILD extra/kdenetwork-kdnssd/PKGBUILD extra/kdenetwork-kget/PKGBUILD extra/kdenetwork-kppp/PKGBUILD extra/kdenetwork-krdc/PKGBUILD extra/kdenetwork-krfb/PKGBUILD extra/kdenetwork-strigi-analyzers/PKGBUILD extra/kdepim-runtime/PKGBUILD extra/kdepim/PKGBUILD extra/kdepimlibs/PKGBUILD extra/kdeplasma-addons/PKGBUILD extra/kdesdk-cervisia/PKGBUILD extra/kdesdk-dev-scripts/PKGBUILD extra/kdesdk-dev-utils/PKGBUILD extra/kdesdk-dolphin-plugins/PKGBUILD extra/kdesdk-kapptemplate/PKGBUILD extra/kdesdk-kate/PKGBUILD extra/kdesdk-kcachegrind/PKGBUILD extra/kdesdk-kioslaves/PKGBUILD extra/kdesdk-kompare/PKGBUILD extra/kdesdk-lokalize/PKGBUILD extra/kdesdk-okteta/PKGBUILD extra/kdesdk-poxml/PKGBUILD extra/kdesdk-strigi-analyzers/PKGBUILD extra/kdesdk-thumbnailers/PKGBUILD extra/kdesdk-umbrello/PKGBUILD extra/kdetoys-amor/PKGBUILD extra/kdetoys-kteatime/PKGBUILD extra/kdetoys-ktux/PKGBUILD extra/kdeutils-filelight/PKGBUILD extra/kdeutils-kcalc/PKGBUILD extra/kdeutils-kcharselect/PKGBUILD extra/kdeutils-kdf/PKGBUILD extra/kdeutils-kfloppy/PKGBUILD extra/kdeutils-kgpg/PKGBUILD extra/kdeutils-kremotecontrol/PKGBUILD extra/kdeutils-ktimer/PKGBUILD extra/kdeutils-kwallet/PKGBUILD extra/kdeutils-print-manager/PKGBUILD extra/kdeutils-superkaramba/PKGBUILD extra/kdeutils-sweeper/PKGBUILD extra/kdewebdev/PKGBUILD extra/kino/PKGBUILD extra/libdrm/PKGBUILD extra/libiec61883/PKGBUILD extra/libkcddb/PKGBUILD extra/libkcompactdisc/PKGBUILD extra/libkdcraw/PKGBUILD extra/libkdeedu/PKGBUILD extra/libkdegames/PKGBUILD extra/libkexiv2/PKGBUILD extra/libkipi/PKGBUILD extra/libkmahjongg/PKGBUILD extra/libksane/PKGBUILD extra/libmikmod/PKGBUILD extra/libmp4v2/PKGBUILD extra/libnet/PKGBUILD extra/libpst/PKGBUILD extra/libsidplay/PKGBUILD extra/libsigsegv/PKGBUILD extra/libvpx/PKGBUILD extra/libxmi/PKGBUILD extra/lua51/PKGBUILD extra/mariadb/PKGBUILD extra/maxima/PKGBUILD extra/mesa/PKGBUILD extra/mjpegtools/PKGBUILD extra/mkvtoolnix/PKGBUILD extra/nepomuk-core/PKGBUILD extra/nepomuk-widgets/PKGBUILD extra/obexd/PKGBUILD extra/opencv/PKGBUILD extra/perl-dbd-mysql/PKGBUILD extra/phonon-gstreamer/PKGBUILD extra/phonon-vlc/PKGBUILD extra/phonon/PKGBUILD extra/plotutils/PKGBUILD extra/postgresql/PKGBUILD extra/pycrypto/PKGBUILD extra/python/PKGBUILD extra/qt4/PKGBUILD extra/qt5/PKGBUILD extra/rcs/PKGBUILD extra/rdesktop/PKGBUILD extra/rtmpdump/PKGBUILD extra/ruby/PKGBUILD extra/signon/PKGBUILD extra/sqlite/PKGBUILD extra/vigra/PKGBUILD extra/vim/PKGBUILD extra/vlc/PKGBUILD extra/w3m/PKGBUILD extra/wcslib/PKGBUILD extra/windowmaker/PKGBUILD extra/x264/PKGBUILD extra/xaos/PKGBUILD extra/xmlto/PKGBUILD libre/angband-libre/PKGBUILD libre/hplip-libre/PKGBUILD libre/kdebase-konqueror-libre/PKGBUILD libre/kdebase-runtime-libre/PKGBUILD libre/kdelibs-libre/PKGBUILD libre/kdenetwork-kopete-libre/PKGBUILD libre/kdepim-libre/PKGBUILD libre/kdeutils-ark-libre/PKGBUILD libre/linux-libre/PKGBUILD libre/mc-libre/PKGBUILD libre/xbmc-libre/PKGBUILD nonprism/kdenetwork-kopete-libre-nonprism/PKGBUILD nonprism/kdepim-runtime-nonprism/PKGBUILD pcr/libquvi-scripts-current/PKGBUILD
Diffstat (limited to 'extra/gpart')
-rw-r--r--extra/gpart/PKGBUILD37
-rw-r--r--extra/gpart/gpart-0.1h-errno.patch20
-rw-r--r--extra/gpart/gpart-0.1h-l64seek.patch71
-rw-r--r--extra/gpart/gpart-0.1h-ntfs.patch75
-rw-r--r--extra/gpart/gpart-0.1h-openmode.patch11
-rw-r--r--extra/gpart/gpart-0.1h-reiserfs-3.6.patch443
-rw-r--r--extra/gpart/gpart-0.1h-vfat.patch17
7 files changed, 8 insertions, 666 deletions
diff --git a/extra/gpart/PKGBUILD b/extra/gpart/PKGBUILD
index 3229f4205..76ee92b5f 100644
--- a/extra/gpart/PKGBUILD
+++ b/extra/gpart/PKGBUILD
@@ -1,49 +1,28 @@
-# $Id: PKGBUILD 143745 2011-11-28 20:14:39Z giovanni $
+# $Id: PKGBUILD 201253 2013-12-06 19:56:50Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: dale <dale@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=gpart
-pkgver=0.1h
-pkgrel=5.1
+pkgver=0.2.1
+pkgrel=1
pkgdesc="Partition table rescue/guessing tool"
arch=('i686' 'x86_64' 'mips64el')
-url="http://www.stud.uni-hannover.de/user/76201/gpart/"
+url="https://github.com/baruch/gpart"
license=('GPL')
depends=('glibc')
-source=("http://www.sfr-fresh.com/linux/misc/${pkgname}-${pkgver}.tar.gz"
- 'gpart-0.1h-errno.patch'
- 'gpart-0.1h-vfat.patch'
- 'gpart-0.1h-ntfs.patch'
- 'gpart-0.1h-reiserfs-3.6.patch'
- 'gpart-0.1h-l64seek.patch'
- 'gpart-0.1h-openmode.patch')
-md5sums=('ee3a2d2dde70bcf404eb354b3d1ee6d4'
- '81eee5d9985df9bf9c23624e46cf945f'
- 'ae6d86b0268618d34e618824dcd82754'
- '8161c02116ee4575906587eb09e35bde'
- '5da425c355740cbf06286755c902b996'
- '9cd7f91c321a83cc1aa202744d1c7cd2'
- 'c982a01385e99b86b32de536c1fbecfb')
+source=("https://github.com/baruch/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
+md5sums=('465870b72b647a3aa22b335ba527e869')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np1 -i ${srcdir}/gpart-0.1h-errno.patch
- patch -Np1 -i ${srcdir}/gpart-0.1h-vfat.patch
- patch -Np1 -i ${srcdir}/gpart-0.1h-ntfs.patch
- patch -Np2 -i ${srcdir}/gpart-0.1h-reiserfs-3.6.patch
- patch -Np1 -i ${srcdir}/gpart-0.1h-l64seek.patch
- patch -Np1 -i ${srcdir}/gpart-0.1h-openmode.patch
-
- sed -i -e "/^CFLAGS/s: -O2 : ${CFLAGS} :" make.defs
- sed -i -e "/^LDFLAGS/s:=:=${LDFLAGS} :" make.defs
-
+ ./configure --prefix=/usr
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
- make prefix=${pkgdir}/usr mandir=${pkgdir}/usr/share/man install
+ make prefix=${pkgdir}/usr install
}
diff --git a/extra/gpart/gpart-0.1h-errno.patch b/extra/gpart/gpart-0.1h-errno.patch
deleted file mode 100644
index 13041c202..000000000
--- a/extra/gpart/gpart-0.1h-errno.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- gpart-0.1h/src/l64seek.c
-+++ gpart-0.1h-working/src/l64seek.c
-@@ -16,6 +16,7 @@
-
- #include "l64seek.h"
-
-+#include <errno.h>
-
- #define OSTACKLEN 16
- static struct
---- gpart-0.1h/src/disku.c
-+++ gpart-0.1h-working/src/disku.c
-@@ -20,6 +20,7 @@
- #include <string.h>
- #include <sys/ioctl.h>
- #include "gpart.h"
-+#include <errno.h>
-
- #if defined(__linux__)
- #include <sys/mount.h>
diff --git a/extra/gpart/gpart-0.1h-l64seek.patch b/extra/gpart/gpart-0.1h-l64seek.patch
deleted file mode 100644
index 8a14411a5..000000000
--- a/extra/gpart/gpart-0.1h-l64seek.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- gpart-0.1h.orig/src/l64seek.c
-+++ gpart-0.1h/src/l64seek.c
-@@ -25,30 +25,11 @@
- } ostck[OSTACKLEN];
- static int osptr = -1;
-
--#if defined(__linux__) && defined(__i386__)
--_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t *,res,uint,wh)
--#endif
--
--
--
- off64_t l64seek(int fd,off64_t offset,int whence)
- {
- off64_t ret = (off64_t)-1;
-
--#if defined(__linux__) && defined(__i386__)
-- int iret;
-- unsigned long ohi, olo;
--
-- ohi = (unsigned long)((offset >> 32) & 0xFFFFFFFF);
-- olo = (unsigned long)(offset & 0xFFFFFFFF);
-- iret = _llseek(fd,ohi,olo,&ret,whence);
-- if (iret == -1)
-- ret = (off64_t)-1;
--#endif
--
--#if defined(__FreeBSD__) || (defined(__linux__) && defined(__alpha__))
- ret = lseek(fd,offset,whence);
--#endif
-
- return (ret);
- }
---- gpart-0.1h.orig/src/l64seek.h
-+++ gpart-0.1h/src/l64seek.h
-@@ -17,6 +17,8 @@
- #ifndef _L64SEEK_H
- #define _L64SEEK_H
-
-+#include <sys/stat.h>
-+#include <sys/types.h>
- #include <unistd.h>
-
- /*
-@@ -25,19 +27,7 @@
- * offsets.
- */
-
--
--#if defined(__linux__)
--# include <linux/unistd.h>
--# include <sys/types.h>
-- typedef int64_t off64_t;
--#endif
--
--
--#if defined(__FreeBSD__)
-- typedef off_t off64_t;
--#endif
--
--
-+typedef loff_t off64_t;
- typedef off64_t s64_t;
-
- off64_t l64seek(int fd, off64_t offset, int whence);
-@@ -45,5 +35,4 @@
- int l64opush(int);
- s64_t l64opop(int);
-
--
- #endif
diff --git a/extra/gpart/gpart-0.1h-ntfs.patch b/extra/gpart/gpart-0.1h-ntfs.patch
deleted file mode 100644
index 1f887ac47..000000000
--- a/extra/gpart/gpart-0.1h-ntfs.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Ripped out of debian
-
---- gpart-0.1h.orig/src/gm_ntfs.h
-+++ gpart-0.1h/src/gm_ntfs.h
-@@ -14,6 +14,9 @@
- *
- */
-
-+#include <stdint.h>
-+#include <asm/byteorder.h>
-+
- #ifndef _GM_NTFS_H
- #define _GM_NTFS_H
-
-@@ -29,32 +32,38 @@
- /* 'NTFS' in little endian */
- #define NTFS_SUPER_MAGIC 0x5346544E
-
--#if defined(i386) || defined(__i386__) || defined(__alpha__)
--
- /* unsigned integral types */
- #ifndef NTFS_INTEGRAL_TYPES
- #define NTFS_INTEGRAL_TYPES
--typedef unsigned char ntfs_u8;
--typedef unsigned short ntfs_u16;
--typedef unsigned int ntfs_u32;
--typedef s64_t ntfs_u64;
-+typedef uint8_t ntfs_u8;
-+typedef uint16_t ntfs_u16;
-+typedef uint32_t ntfs_u32;
-+typedef uint64_t ntfs_u64;
-+typedef int8_t ntfs_s8;
-+typedef int16_t ntfs_s16;
- #endif /* NTFS_INTEGRAL_TYPES */
--#endif /* defined(i386) || defined(__i386__) || defined(__alpha__) */
--
--
--/* Macros reading unsigned integers from a byte pointer */
--/* these should work for all little endian machines */
--#define NTFS_GETU8(p) (*(ntfs_u8*)(p))
--#define NTFS_GETU16(p) (*(ntfs_u16*)(p))
--#define NTFS_GETU24(p) (NTFS_GETU32(p) & 0xFFFFFF)
--#define NTFS_GETU32(p) (*(ntfs_u32*)(p))
--#define NTFS_GETU64(p) (*(ntfs_u64*)(p))
--
--/* Macros reading signed integers, returning int */
--#define NTFS_GETS8(p) ((int)(*(char*)(p)))
--#define NTFS_GETS16(p) ((int)(*(short*)(p)))
--#define NTFS_GETS24(p) (NTFS_GETU24(p) < 0x800000 ? (int)NTFS_GETU24(p) :
--
-
-+#define CPU_TO_LE16(a) __cpu_to_le16(a)
-+#define CPU_TO_LE32(a) __cpu_to_le32(a)
-+#define CPU_TO_LE64(a) __cpu_to_le64(a)
-+
-+#define LE16_TO_CPU(a) __cpu_to_le16(a)
-+#define LE32_TO_CPU(a) __cpu_to_le32(a)
-+#define LE64_TO_CPU(a) __cpu_to_le64(a)
-+
-+/* Macros reading unsigned integers */
-+#define NTFS_GETU8(p) (*(ntfs_u8*)(p))
-+#define NTFS_GETU16(p) ((ntfs_u16)LE16_TO_CPU(*(ntfs_u16*)(p)))
-+#define NTFS_GETU24(p) ((ntfs_u32)NTFS_GETU16(p) | \
-+ ((ntfs_u32)NTFS_GETU8(((char*)(p)) + 2) << 16))
-+#define NTFS_GETU32(p) ((ntfs_u32)LE32_TO_CPU(*(ntfs_u32*)(p)))
-+#define NTFS_GETU64(p) ((ntfs_u64)LE64_TO_CPU(*(ntfs_u64*)(p)))
-+
-+/* Macros reading signed integers */
-+#define NTFS_GETS8(p) ((*(ntfs_s8*)(p)))
-+#define NTFS_GETS16(p) ((ntfs_s16)LE16_TO_CPU(*(short*)(p)))
-+#define NTFS_GETS24(p) (NTFS_GETU24(p) < 0x800000 ? \
-+ (int)NTFS_GETU24(p) : \
-+ (int)(NTFS_GETU24(p) - 0x1000000))
-
- #endif /* _GM_NTFS_H */
diff --git a/extra/gpart/gpart-0.1h-openmode.patch b/extra/gpart/gpart-0.1h-openmode.patch
deleted file mode 100644
index ca13cc942..000000000
--- a/extra/gpart/gpart-0.1h-openmode.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- gpart.orig/src/gpart.c 2008-10-19 15:06:06.000000000 +0000
-+++ gpart/src/gpart.c 2008-11-25 07:34:47.000000000 +0000
-@@ -1221,7 +1221,7 @@ static int make_mbr_backup(disk_desc *d,
- {
- int fd, ret = 0;
-
-- if ((fd = open(bfile,O_WRONLY|O_CREAT)) < 0)
-+ if ((fd = open(bfile,O_WRONLY|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0)
- return (ret);
-
- if (write(fd,d->d_pt.t_boot,512) == 512)
diff --git a/extra/gpart/gpart-0.1h-reiserfs-3.6.patch b/extra/gpart/gpart-0.1h-reiserfs-3.6.patch
deleted file mode 100644
index 257015d2b..000000000
--- a/extra/gpart/gpart-0.1h-reiserfs-3.6.patch
+++ /dev/null
@@ -1,443 +0,0 @@
-diff -rupN ./gpart-0.1h.orig/README ./gpart-0.1h/README
---- ./gpart-0.1h.orig/README Wed Feb 7 20:58:12 2001
-+++ ./gpart-0.1h/README Fri Jan 10 16:29:43 2003
-@@ -24,25 +24,25 @@
-
- - Currently recognized partitions/filesystems types ---------------------
-
-- Modname Typ Description
-- fat 0x01 "Primary DOS with 12 bit FAT"
-- 0x04 "Primary DOS with 16 bit FAT (<= 32MB)"
-- 0x06 "Primary 'big' DOS (> 32MB)"
-- 0x0B "DOS or Windows 95 with 32 bit FAT"
-- 0x0C "DOS or Windows 95 with 32 bit FAT, LBA"
-- ntfs 0x07 "OS/2 HPFS, NTFS, QNX or Advanced UNIX"
-- hpfs 0x07 "OS/2 HPFS, NTFS, QNX or Advanced UNIX"
-- ext2 0x83 "Linux ext2 filesystem"
-- lswap 0x82 "Linux swap"
-- bsddl 0xA5 "FreeBSD/NetBSD/386BSD"
-- s86dl 0x82 "Solaris/x86 disklabel"
-- minix 0x80 "Minix V1"
-- 0x81 "Minix V2"
-- rfs 0x83 "Reiser filesystem"
-- hmlvm 0xFE "Linux LVM physical volumes"
-- qnx4 0x4F "QNX 4.x"
-- beos 0xEB "BeOS fs"
-- xfs 0x83 "SGI XFS filesystem"
-+ Modname Typ Description
-+ fat 0x01 "Primary DOS with 12 bit FAT"
-+ 0x04 "Primary DOS with 16 bit FAT (<= 32MB)"
-+ 0x06 "Primary 'big' DOS (> 32MB)"
-+ 0x0B "DOS or Windows 95 with 32 bit FAT"
-+ 0x0C "DOS or Windows 95 with 32 bit FAT, LBA"
-+ ntfs 0x07 "OS/2 HPFS, NTFS, QNX or Advanced UNIX"
-+ hpfs 0x07 "OS/2 HPFS, NTFS, QNX or Advanced UNIX"
-+ ext2 0x83 "Linux ext2 filesystem"
-+ lswap 0x82 "Linux swap"
-+ bsddl 0xA5 "FreeBSD/NetBSD/386BSD"
-+ s86dl 0x82 "Solaris/x86 disklabel"
-+ minix 0x80 "Minix V1"
-+ 0x81 "Minix V2"
-+ reiserfs 0x83 "ReiserFS filesystem"
-+ hmlvm 0xFE "Linux LVM physical volumes"
-+ qnx4 0x4F "QNX 4.x"
-+ beos 0xEB "BeOS fs"
-+ xfs 0x83 "SGI XFS filesystem"
-
-
-
-diff -rupN ./gpart-0.1h.orig/man/gpart.man ./gpart-0.1h/man/gpart.man
---- ./gpart-0.1h.orig/man/gpart.man Wed Feb 7 20:54:18 2001
-+++ ./gpart-0.1h/man/gpart.man Fri Jan 10 16:31:52 2003
-@@ -63,8 +63,8 @@ MS Windows NT/2000 filesystem.
- .I qnx4
- QNX 4.x filesystem.
- .TP
--.I rfs
--The Reiser filesystem (version 3.5.X, X > 11).
-+.I reiserfs
-+The Reiser filesystem (version 3.5.X, X > 11, 3.6.X).
- .TP
- .I s86dl
- Sun Solaris on Intel platforms uses a sub-partitioning
-diff -rupN ./gpart-0.1h.orig/src/Makefile ./gpart-0.1h/src/Makefile
---- ./gpart-0.1h.orig/src/Makefile Tue Jan 30 20:01:08 2001
-+++ ./gpart-0.1h/src/Makefile Fri Jan 10 16:32:24 2003
-@@ -19,7 +19,7 @@ CFLAGS+=-DGPART_LANG=\'$(GPART_LANG)\'
- endif
-
-
--mod=ext2 lswap fat bsddl ntfs hpfs s86dl minix rfs hmlvm qnx4 beos xfs
-+mod=ext2 lswap fat bsddl ntfs hpfs s86dl minix reiserfs hmlvm qnx4 beos xfs
- modobj=$(foreach m,$(mod),gm_$(m).o)
- obj=gpart.o gmodules.o disku.o l64seek.o $(modobj)
- src=$(obj:.o=.c)
-diff -rupN ./gpart-0.1h.orig/src/gm_reiserfs.c ./gpart-0.1h/src/gm_reiserfs.c
---- ./gpart-0.1h.orig/src/gm_reiserfs.c Thu Jan 1 03:00:00 1970
-+++ ./gpart-0.1h/src/gm_reiserfs.c Fri Jan 10 17:25:30 2003
-@@ -0,0 +1,91 @@
-+/*
-+ * gm_reiserfs.c -- gpart ReiserFS guessing module
-+ *
-+ * gpart (c) 1999-2001 Michail Brzitwa <mb@ichabod.han.de>
-+ * Guess PC-type hard disk partitions.
-+ *
-+ * gpart is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published
-+ * by the Free Software Foundation; either version 2, or (at your
-+ * option) any later version.
-+ *
-+ * Created: 21.01.1999 <mb@ichabod.han.de>
-+ * Modified: 26.12.2000 Francis Devereux <francis@devereux.tc>
-+ * Added reiserfs 3.5.28 support.
-+ * Modified: 10.01.2003 Yury Umanets <umka@namesys.com>
-+ * Added reiserfs 3.6.x support.
-+ *
-+ */
-+
-+#include <string.h>
-+#include <errno.h>
-+#include "gpart.h"
-+#include "gm_reiserfs.h"
-+
-+static const char rcsid[] = "$Id: gm_reiserfs.c,v 1.5 2003/01/10 16:38:08 mb Exp mb $";
-+
-+
-+int reiserfs_init(disk_desc *d,g_module *m)
-+{
-+ if ((d == 0) || (m == 0))
-+ return (0);
-+
-+ m->m_desc = "ReiserFS filesystem";
-+ return (REISERFS_FIRST_BLOCK * 1024 + SB_V35_SIZE);
-+}
-+
-+
-+
-+int reiserfs_term(disk_desc *d)
-+{
-+ return (1);
-+}
-+
-+
-+
-+int reiserfs_gfun(disk_desc *d,g_module *m)
-+{
-+ struct reiserfs_super_block_v35 *sb;
-+ dos_part_entry *pt = &m->m_part;
-+ s64_t size;
-+
-+ m->m_guess = GM_NO;
-+ sb = (struct reiserfs_super_blockv35 *)(d->d_sbuf + REISERFS_FIRST_BLOCK * 1024);
-+ if (strncmp(sb->s_magic,REISERFS_SUPER_V35_MAGIC,12) == 0 ||
-+ strncmp(sb->s_magic,REISERFS_SUPER_V36_MAGIC,12) == 0)
-+ {
-+ /*
-+ * sanity checks.
-+ */
-+
-+ if (sb->s_block_count < sb->s_free_blocks)
-+ return (1);
-+
-+ if (sb->s_block_count < REISERFS_MIN_BLOCK_AMOUNT)
-+ return (1);
-+
-+ if ((sb->s_state != REISERFS_VALID_FS) &&
-+ (sb->s_state != REISERFS_ERROR_FS))
-+ return (1);
-+
-+ if (sb->s_oid_maxsize % 2) /* must be even */
-+ return (1);
-+
-+ if (sb->s_oid_maxsize < sb->s_oid_cursize)
-+ return (1);
-+
-+ if ((sb->s_blocksize != 4096) && (sb->s_blocksize != 8192))
-+ return (1);
-+
-+ /*
-+ * ok.
-+ */
-+
-+ m->m_guess = GM_YES;
-+ pt->p_start = d->d_nsb;
-+ size = sb->s_block_count; size *= sb->s_blocksize; size /= d->d_ssize;
-+ pt->p_size = (unsigned long)size;
-+ pt->p_typ = 0x83;
-+ }
-+ return (1);
-+}
-diff -rupN ./gpart-0.1h.orig/src/gm_reiserfs.h ./gpart-0.1h/src/gm_reiserfs.h
---- ./gpart-0.1h.orig/src/gm_reiserfs.h Thu Jan 1 03:00:00 1970
-+++ ./gpart-0.1h/src/gm_reiserfs.h Fri Jan 10 17:25:55 2003
-@@ -0,0 +1,82 @@
-+/*
-+ * gm_reiserfs.h -- gpart ReiserFS guessing module header
-+ *
-+ * gpart (c) 1999-2001 Michail Brzitwa <mb@ichabod.han.de>
-+ * Guess PC-type hard disk partitions.
-+ *
-+ * gpart is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published
-+ * by the Free Software Foundation; either version 2, or (at your
-+ * option) any later version.
-+ *
-+ * Created: 21.01.1999 <mb@ichabod.han.de>
-+ * Modified: 26.12.2000 Francis Devereux <francis@devereux.tc>
-+ * Update support reiserfs version 3.5.28
-+ * Modified: 10.01.2003 Yury Umanets <umka@namesys.com>
-+ * Added reiserfs 3.6.x support.
-+ *
-+ */
-+
-+#ifndef _GM_reiserfs_H
-+#define _GM_reiserfs_H
-+
-+/* imported from asm/types.h */
-+typedef __signed__ char __s8;
-+typedef unsigned char __u8;
-+
-+typedef __signed__ short __s16;
-+typedef unsigned short __u16;
-+
-+typedef __signed__ int __s32;
-+typedef unsigned int __u32;
-+
-+/*
-+ * taken from ReiserFS v3.5.28, v3.6.x. Reiserfs Copyright 1996-2000 Hans Reiser
-+ */
-+
-+#define REISERFS_SUPER_V35_MAGIC "ReIsErFs"
-+#define REISERFS_SUPER_V36_MAGIC "ReIsEr2Fs"
-+
-+#define REISERFS_FIRST_BLOCK 64
-+#define REISERFS_VALID_FS 1
-+#define REISERFS_ERROR_FS 2
-+#define REISERFS_MIN_BLOCK_AMOUNT 100
-+
-+struct reiserfs_super_block_v35
-+{
-+ __u32 s_block_count; /* blocks count */
-+ __u32 s_free_blocks; /* free blocks count */
-+ __u32 s_root_block; /* root block number */
-+ __u32 s_journal_block; /* journal block number */
-+ __u32 s_journal_dev; /* journal device number */
-+ __u32 s_orig_journal_size; /* size of the journal on FS creation. used to make sure they don't overflow it */
-+ __u32 s_journal_trans_max; /* max number of blocks in a transaction. */
-+ __u32 s_journal_block_count; /* total size of the journal. can change over time */
-+ __u32 s_journal_max_batch; /* max number of blocks to batch into a trans */
-+ __u32 s_journal_max_commit_age; /* in seconds, how old can an async commit be */
-+ __u32 s_journal_max_trans_age; /* in seconds, how old can a transaction be */
-+ __u16 s_blocksize; /* block size */
-+ __u16 s_oid_maxsize; /* max size of object id array, see get_objectid() commentary */
-+ __u16 s_oid_cursize; /* current size of object id array */
-+ __u16 s_state; /* valid or error */
-+ char s_magic[12]; /* reiserfs magic string indicates that file system is reiserfs */
-+ __u32 s_hash_function_code; /* indicate, what hash fuction is being use to sort names in a directory*/
-+ __u16 s_tree_height; /* height of disk tree */
-+ __u16 s_bmap_nr; /* amount of bitmap blocks needed to address each block of file system */
-+ __u16 s_reserved;
-+};
-+
-+#define SB_V35_SIZE (sizeof(struct reiserfs_super_block_v35))
-+
-+struct reiserfs_super_block_v36 {
-+ struct reiserfs_super_block_v35 s_v35;
-+ __u32 s_inode_generation;
-+ __u32 s_flags;
-+ char s_uuid[16];
-+ char s_label[16];
-+ char s_unused[88];
-+};
-+
-+#define SB_V36_SIZE (sizeof(struct reiserfs_super_block_v36))
-+
-+#endif /* _GM_REISERFS_H */
-diff -rupN ./gpart-0.1h.orig/src/gm_rfs.c ./gpart-0.1h/src/gm_rfs.c
---- ./gpart-0.1h.orig/src/gm_rfs.c Wed Feb 7 21:08:08 2001
-+++ ./gpart-0.1h/src/gm_rfs.c Thu Jan 1 03:00:00 1970
-@@ -1,88 +0,0 @@
--/*
-- * gm_rfs.c -- gpart ReiserFS guessing module
-- *
-- * gpart (c) 1999-2001 Michail Brzitwa <mb@ichabod.han.de>
-- * Guess PC-type hard disk partitions.
-- *
-- * gpart is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published
-- * by the Free Software Foundation; either version 2, or (at your
-- * option) any later version.
-- *
-- * Created: 21.01.1999 <mb@ichabod.han.de>
-- * Modified: 26.12.2000 Francis Devereux <francis@devereux.tc>
-- * Added reiserfs 3.5.28 support.
-- *
-- */
--
--#include <string.h>
--#include <errno.h>
--#include "gpart.h"
--#include "gm_rfs.h"
--
--static const char rcsid[] = "$Id: gm_rfs.c,v 1.5 2001/02/07 18:08:08 mb Exp mb $";
--
--
--int rfs_init(disk_desc *d,g_module *m)
--{
-- if ((d == 0) || (m == 0))
-- return (0);
--
-- m->m_desc = "Reiser filesystem";
-- return (REISERFS_FIRST_BLOCK * 1024 + SB_SIZE);
--}
--
--
--
--int rfs_term(disk_desc *d)
--{
-- return (1);
--}
--
--
--
--int rfs_gfun(disk_desc *d,g_module *m)
--{
-- struct reiserfs_super_block *sb;
-- dos_part_entry *pt = &m->m_part;
-- s64_t size;
--
-- m->m_guess = GM_NO;
-- sb = (struct reiserfs_super_block *)(d->d_sbuf + REISERFS_FIRST_BLOCK * 1024);
-- if (strncmp(sb->s_magic,REISERFS_SUPER_MAGIC,12) == 0)
-- {
-- /*
-- * sanity checks.
-- */
--
-- if (sb->s_block_count < sb->s_free_blocks)
-- return (1);
--
-- if (sb->s_block_count < REISERFS_MIN_BLOCK_AMOUNT)
-- return (1);
--
-- if ((sb->s_state != REISERFS_VALID_FS) &&
-- (sb->s_state != REISERFS_ERROR_FS))
-- return (1);
--
-- if (sb->s_oid_maxsize % 2) /* must be even */
-- return (1);
--
-- if (sb->s_oid_maxsize < sb->s_oid_cursize)
-- return (1);
--
-- if ((sb->s_blocksize != 4096) && (sb->s_blocksize != 8192))
-- return (1);
--
-- /*
-- * ok.
-- */
--
-- m->m_guess = GM_YES;
-- pt->p_start = d->d_nsb;
-- size = sb->s_block_count; size *= sb->s_blocksize; size /= d->d_ssize;
-- pt->p_size = (unsigned long)size;
-- pt->p_typ = 0x83;
-- }
-- return (1);
--}
-diff -rupN ./gpart-0.1h.orig/src/gm_rfs.h ./gpart-0.1h/src/gm_rfs.h
---- ./gpart-0.1h.orig/src/gm_rfs.h Mon Jan 29 16:34:35 2001
-+++ ./gpart-0.1h/src/gm_rfs.h Thu Jan 1 03:00:00 1970
-@@ -1,68 +0,0 @@
--/*
-- * gm_rfs.h -- gpart ReiserFS guessing module header
-- *
-- * gpart (c) 1999-2001 Michail Brzitwa <mb@ichabod.han.de>
-- * Guess PC-type hard disk partitions.
-- *
-- * gpart is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published
-- * by the Free Software Foundation; either version 2, or (at your
-- * option) any later version.
-- *
-- * Created: 21.01.1999 <mb@ichabod.han.de>
-- * Modified: 26.12.2000 Francis Devereux <francis@devereux.tc>
-- * Update support reiserfs version 3.5.28
-- *
-- */
--
--#ifndef _GM_RFS_H
--#define _GM_RFS_H
--
--/* imported from asm/types.h */
--typedef __signed__ char __s8;
--typedef unsigned char __u8;
--
--typedef __signed__ short __s16;
--typedef unsigned short __u16;
--
--typedef __signed__ int __s32;
--typedef unsigned int __u32;
--
--/*
-- * taken from ReiserFS v3.5.28. Reiserfs Copyright 1996-2000 Hans Reiser
-- */
--
--#define REISERFS_SUPER_MAGIC "ReIsErFs"
--#define REISERFS_FIRST_BLOCK 64
--#define REISERFS_VALID_FS 1
--#define REISERFS_ERROR_FS 2
--#define REISERFS_MIN_BLOCK_AMOUNT 100
--
--struct reiserfs_super_block
--{
-- __u32 s_block_count; /* blocks count */
-- __u32 s_free_blocks; /* free blocks count */
-- __u32 s_root_block; /* root block number */
-- __u32 s_journal_block; /* journal block number */
-- __u32 s_journal_dev; /* journal device number */
-- __u32 s_orig_journal_size; /* size of the journal on FS creation. used to make sure they don't overflow it */
-- __u32 s_journal_trans_max; /* max number of blocks in a transaction. */
-- __u32 s_journal_block_count; /* total size of the journal. can change over time */
-- __u32 s_journal_max_batch; /* max number of blocks to batch into a trans */
-- __u32 s_journal_max_commit_age; /* in seconds, how old can an async commit be */
-- __u32 s_journal_max_trans_age; /* in seconds, how old can a transaction be */
-- __u16 s_blocksize; /* block size */
-- __u16 s_oid_maxsize; /* max size of object id array, see get_objectid() commentary */
-- __u16 s_oid_cursize; /* current size of object id array */
-- __u16 s_state; /* valid or error */
-- char s_magic[12]; /* reiserfs magic string indicates that file system is reiserfs */
-- __u32 s_hash_function_code; /* indicate, what hash fuction is being use to sort names in a directory*/
-- __u16 s_tree_height; /* height of disk tree */
-- __u16 s_bmap_nr; /* amount of bitmap blocks needed to address each block of file system */
-- __u16 s_reserved;
--};
--
--#define SB_SIZE (sizeof(struct reiserfs_super_block))
--
--
--#endif /* _GM_RFS_H */
-diff -rupN ./gpart-0.1h.orig/src/gmodules.c ./gpart-0.1h/src/gmodules.c
---- ./gpart-0.1h.orig/src/gmodules.c Tue Jan 30 20:01:00 2001
-+++ ./gpart-0.1h/src/gmodules.c Fri Jan 10 16:31:28 2003
-@@ -154,7 +154,7 @@ void g_mod_addinternals()
- GMODINS(bsddl);
- GMODINS(lswap);
- GMODINS(qnx4);
-- GMODINS(rfs);
-+ GMODINS(reiserfs);
- GMODINS(ntfs);
- GMODINS(hpfs);
- GMODINS(minix);
-diff -rupN ./gpart-0.1h.orig/src/gmodules.h ./gpart-0.1h/src/gmodules.h
---- ./gpart-0.1h.orig/src/gmodules.h Tue Jan 30 20:00:47 2001
-+++ ./gpart-0.1h/src/gmodules.h Fri Jan 10 16:31:23 2003
-@@ -63,7 +63,7 @@ g_module *g_mod_setweight(char *,float);
-
- GMODDECL(bsddl); GMODDECL(ext2); GMODDECL(fat);
- GMODDECL(hpfs); GMODDECL(lswap); GMODDECL(ntfs);
--GMODDECL(s86dl); GMODDECL(minix); GMODDECL(rfs);
-+GMODDECL(s86dl); GMODDECL(minix); GMODDECL(reiserfs);
- GMODDECL(hmlvm); GMODDECL(qnx4); GMODDECL(beos);
- GMODDECL(xfs);
-
diff --git a/extra/gpart/gpart-0.1h-vfat.patch b/extra/gpart/gpart-0.1h-vfat.patch
deleted file mode 100644
index 7234ac689..000000000
--- a/extra/gpart/gpart-0.1h-vfat.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Ripped out of debian
-
---- gpart-0.1h.orig/src/gm_fat.h
-+++ gpart-0.1h/src/gm_fat.h
-@@ -60,6 +60,10 @@
- __u16 info_sector; /* filesystem info sector */
- __u16 backup_boot; /* backup boot sector */
- __u16 reserved2[6]; /* Unused */
--};
--
-+} __attribute__ ((packed));
-+/* "__attribute__ ((packed))"
-+ added by davidc@debian.org,
-+ as suggested by falk@zxmjz18.extern.uni-tuebingen.de
-+ Fri Jul 07 18:04:15 2000
-+ in debian bug report #66893 "FAT detection broken on Alpha" */
- #endif /* _GM_FAT_H */