diff -Nru gpart-0.2.2/configure.ac gpart-0.3/configure.ac --- gpart-0.2.2/configure.ac 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/configure.ac 2015-11-24 11:03:45.000000000 +0000 @@ -1,9 +1,9 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ([2.69]) -AC_INIT(gpart, 0.2.1, https://github.com/baruch/gpart/issues) -AM_INIT_AUTOMAKE([1.14]) +AC_PREREQ([2.64]) +AC_INIT(gpart, 0.2.3-dev, https://github.com/baruch/gpart/issues) +AM_INIT_AUTOMAKE([1.11]) AC_CONFIG_SRCDIR([src/gpart.c]) AC_CONFIG_HEADERS([config.h]) @@ -28,6 +28,9 @@ AC_FUNC_MALLOC AC_CHECK_FUNCS([getpagesize memset strchr strdup strerror strtoul]) +# Configure system services. +AC_SYS_LARGEFILE + AC_CONFIG_FILES([Makefile man/Makefile src/Makefile diff -Nru gpart-0.2.2/debian/changelog gpart-0.3/debian/changelog --- gpart-0.2.2/debian/changelog 2015-04-28 21:26:05.000000000 +0000 +++ gpart-0.3/debian/changelog 2015-11-25 00:32:37.000000000 +0000 @@ -1,3 +1,16 @@ +gpart (1:0.3-1) unstable; urgency=medium + + * New upstream release. (Closes: #705076) + * debian/control: updated the long description. + * debian/copyright: + - Added rights for Martin Wilck. + - Added the Upstream-Contact field to header. + * debian/docs: removed. Now, the upstream is + installing the README.md file. + * README.Debian: updated. + + -- Joao Eriberto Mota Filho Tue, 24 Nov 2015 21:17:55 -0200 + gpart (1:0.2.2-2) unstable; urgency=medium * Upload to unstable. Welcome Jessie Stable! @@ -82,7 +95,7 @@ gpart (0.1h-11) unstable; urgency=low * Minimizing rules file. - * Adding forgotton seperator in build target of rules. + * Adding forgotten separator in build target of rules. * Setting uploaders to Christophe. -- Daniel Baumann Wed, 29 Jul 2009 21:14:51 +0200 @@ -167,7 +180,7 @@ * Applied the reiserfs 3.6 recognition patch from ftp://ftp.namesys.com/pub/misc-patches/gpart-0.1h-reiserfs-3.6.patch.gz Closes: #246989, #322256 - * Recogniise ext3 filesystems as well as ext2. Thanks to Xisco Calafat + * Recognize ext3 filesystems as well as ext2. Thanks to Xisco Calafat for the patch. Closes: #212989 -- Steve McIntyre <93sam@debian.org> Sat, 28 Oct 2006 22:50:42 +0100 diff -Nru gpart-0.2.2/debian/control gpart-0.3/debian/control --- gpart-0.2.2/debian/control 2015-03-11 19:49:31.000000000 +0000 +++ gpart-0.3/debian/control 2015-11-24 23:52:19.000000000 +0000 @@ -28,12 +28,13 @@ Currently supported (guessable) filesystem or partition types: . * BeOS filesystem type. + * BtrFS filesystem type. * FreeBSD/NetBSD/386BSD disklabel sub-partitioning scheme used on Intel platforms. - * Linux second extended filesystem. - * MS-DOS FAT12/16/32 "filesystems". + * Linux second extended filesystem (Ext2). + * MS-DOS FAT12, FAT16 and FAT32 "filesystems". * IBM OS/2 High Performance filesystem. - * Linux LVM physical volumes (LVM by Heinz Mauelshagen). + * Linux LVM and LVM2 physical volumes. * Linux swap partitions (versions 0 and 1). * The Minix operating system filesystem type. * MS Windows NT/2000 filesystem. diff -Nru gpart-0.2.2/debian/copyright gpart-0.3/debian/copyright --- gpart-0.2.2/debian/copyright 2015-03-12 17:13:10.000000000 +0000 +++ gpart-0.3/debian/copyright 2015-11-24 23:31:51.000000000 +0000 @@ -1,5 +1,6 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: gpart +Upstream-Contact: Baruch Even Source: https://github.com/baruch/gpart Comment: the original homepage (from initial upstream) was http://www.brzitwa.de/mb/gpart. @@ -7,10 +8,11 @@ Files: * Copyright: 1999-2001 Michail Brzitwa 2013-2015 Baruch Even + 2015 Martin Wilck License: GPL-2+ Comment: Baruch Even didn't put his name into the source code yet. However, Baruch did several changes in gpart and released - the 0.2 and 0.2.1 versions in GitHub. Baruch already was + the 0.2 and later versions in GitHub. Baruch already was a DD. Files: src/gm_reiserfs.h diff -Nru gpart-0.2.2/debian/docs gpart-0.3/debian/docs --- gpart-0.2.2/debian/docs 2015-03-01 14:42:48.000000000 +0000 +++ gpart-0.3/debian/docs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -README diff -Nru gpart-0.2.2/debian/README.Debian gpart-0.3/debian/README.Debian --- gpart-0.2.2/debian/README.Debian 2015-03-12 17:09:32.000000000 +0000 +++ gpart-0.3/debian/README.Debian 2015-11-24 23:51:35.000000000 +0000 @@ -3,7 +3,35 @@ This README file was specially written to make public all changes implemented by Baruch Even in GPart v2. These lines were compiled -from each commit in GitHub[1]. +from each commit in GitHub[1][2]. + +--- 0.3 version + +Tue Nov 24 13:03:45 2015 +0200 - Baruch Even: Merge pull request #8 from mwilck/export +Fri Nov 20 22:41:09 2015 +0100 - Martin Wilck: gpart: add btrfs support +Thu Nov 19 23:22:50 2015 +0100 - Martin Wilck: gpart: add support for LVM2 physical volumes +Sat Jun 27 20:03:12 2015 +0300 - Baruch Even: Merge pull request #7 from ian-abbott/readme-improvements +Fri Jun 26 13:17:23 2015 +0100 - Ian Abbott: README.md: Mention that the real chs range is tagged with 'r'. +Fri Jun 26 13:04:30 2015 +0100 - Ian Abbott: README.md: Mention that the tool is for MBR-partitioned disks +Fri Jun 26 12:55:05 2015 +0100 - Ian Abbott: README.md: Remove phrase about dynamically loading modules. +Fri Jun 26 12:47:10 2015 +0100 - Ian Abbott: README.md: A few spelling/consistency changes +Fri Jun 26 12:30:02 2015 +0100 - Ian Abbott: README.md: add markdown to the output explanation +Fri Jun 26 12:09:03 2015 +0100 - Ian Abbott: README.md: Remove a lot of unnecessary indentation from paragraphs +Fri Jun 26 11:53:48 2015 +0100 - Ian Abbott: README.md: markdown filenames +Fri Jun 26 11:40:32 2015 +0100 - Ian Abbott: README.md: miscellaneous markdown changes in function descriptions +Fri Jun 26 11:16:04 2015 +0100 - Ian Abbott: README.md: use block quotes for guessing module function descriptions +Fri Jun 26 10:45:55 2015 +0100 - Ian Abbott: README.md: use GitHub Flavored Markdown for partition type table +Fri Jun 26 08:22:52 2015 +0300 - Baruch Even: Prevent warnings in gcc +Fri Jun 26 08:21:25 2015 +0300 - Baruch Even: Avoid warnings in gcc +Fri Jun 26 08:17:15 2015 +0300 - Baruch Even: Remove rcsid +Fri Jun 26 08:13:23 2015 +0300 - Baruch Even: Require a lower automake for travis-ci +Thu Jun 25 22:53:59 2015 +0300 - Baruch Even: Only require autoconf 2.64 +Thu Jun 25 21:05:13 2015 +0300 - Baruch Even: Convert README.md to real markdown +Thu Jun 25 21:03:03 2015 +0300 - Baruch Even: Rename README to README.md +Thu Jun 25 21:02:15 2015 +0300 - Baruch Even: Add a .travis.yml to build with travis-ci +Thu Jun 25 20:58:32 2015 +0300 - Baruch Even: Prepare version string for next version 0.2.3-dev +Thu Jun 25 20:57:03 2015 +0300 - Baruch Even: Merge pull request #5 from ian-abbott/lfs-fixes +Wed Jun 24 13:12:15 2015 +0100 - Ian Abbott: Use AC_SYS_LARGEFILE --- 0.2.2 version @@ -62,5 +90,10 @@ Wed Oct 30 21:26:38 2013 +0200 - Baruch Even: Import 0.1f [1] https://github.com/baruch/gpart +[2] Commands: + $ git clone https://github.com/baruch/gpart + $ $ git checkout tags/ + $ $ git log --pretty=format:"%ad - %an: %s" - -- Joao Eriberto Mota Filho Thu, 12 Mar 2015 09:24:50 -0300 + -- Joao Eriberto Mota Filho Thu, 12 Mar 2015 09:24:50 -0300, + last updated on Tue, 24 Nov 2015 21:17:55 -0200 diff -Nru gpart-0.2.2/Makefile.am gpart-0.3/Makefile.am --- gpart-0.2.2/Makefile.am 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/Makefile.am 2015-11-24 11:03:45.000000000 +0000 @@ -2,5 +2,5 @@ SUBDIRS = src man docdir = $(datadir)/doc/@PACKAGE@ -doc_DATA = Changes README -EXTRA_DIST = Changes README +doc_DATA = Changes README.md +EXTRA_DIST = Changes README.md diff -Nru gpart-0.2.2/README gpart-0.3/README --- gpart-0.2.2/README 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,213 +0,0 @@ - - gpart README - - - Gpart is a small tool which tries to guess what partitions - are on a PC type harddisk in case the primary partition table - was damaged. - - Gpart works by scanning through the device (or file) given on - the command line on a sector basis. Each guessing module is - asked if it thinks a file system it knows about could start at - a given sector. Several file system guessing modules are built - in, others can be added dynamically. - - Consult the manual page for command line options and usage. - - - - - Installation ---------------------------------------------------------- - - See file INSTALL. - - - - - 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" - reiserfs 0x83 "ReiserFS filesystem" - hmlvm 0xFE "Linux LVM physical volumes" - qnx4 0x4F "QNX 4.x" - beos 0xEB "BeOS fs" - xfs 0x83 "SGI XFS filesystem" - - - - - Guessing modules ------------------------------------------------------ - - Each guessing module must provide three functions callabble from - gpart: - - int xxx_init(disk_desc *d,g_module *m) - Initialisation function. Will be called before a scan. - It should return the minimum number of bytes it wants - to receive for a test. The module should set the - description of the filesystem/partition type it handles - in g_module.m_desc. If the filesystem/partition type - included a partition table like first sector (like the - *BSD disklabels do), the flag m_hasptbl should be set. - Another flag is m_notinext which means the tested type - cannot reside in a logical partition. - - int xxx_term(disk_desc *d) - Termination/cleanup function, called after the scanning - of the device has been done. - - int xxx_gfun(disk_desc *d,g_module *m) - The actual guessing function, called from within the - scan loop. It should test the plausibility of the - given sectors, and return its guess in m->m_guess (a - probability between 0 and 1). See existing modules - for examples. - - The given file descriptor d->d_fd can be used for seeking - and reading (see e.g. gm_ext2.c which tries to read - the first spare superblock). If a module is convinced - that it has found a filesystem/partition start it should - fill in the assumed begin and size of the partition. - - The test performed should not be too pedantic, for - instance it should not be relied upon that the file- - system is clean/was properly unmounted. On the other - hand too much tolerance leads to misguided guesses, - so a golden middle way must be found. - - - - Output explanation ---------------------------------------------------- - - Here is a sample 'gpart -v' run on my first IDE hard disk - (comments in brackets): - -dev(/dev/hda) mss(512) chs(1232/255/63)(LBA) #s(19792080) size(9664mb) -[ - mss is the medium sector size, chs the geometry retrieved - from the OS (or from the command line), #s is the total - sector count. -] - -Primary partition(1) - type: 006(0x06)(Primary 'big' DOS (> 32MB)) (BOOT) - size: 502mb #s(1028097) s(63-1028159) - chs: (0/1/1)-(63/254/63)d (0/1/1)-(63/254/63)r - hex: 80 01 01 00 06 FE 3F 3F 3F 00 00 00 01 B0 0F 00 -[ - size: the size of the partition in megabytes, number of - sectors and the sector range. - chs: the partition table chs range (d) and the real one. - If the number of cylinders is less than 1024 both are - identical. - hex: the hexadecimal representation of the partition entry - as found in the partition table. -] - -... - -Begin scan... -Possible partition(DOS FAT), size(502mb), offset(0mb) - type: 006(0x06)(Primary 'big' DOS (> 32MB)) - size: 502mb #s(1028097) s(63-1028159) - chs: (0/1/1)-(63/254/63)d (0/1/1)-(63/254/63)r - hex: 00 01 01 00 06 FE 3F 3F 3F 00 00 00 01 B0 0F 00 - -Possible extended partition at offset(502mb) - Possible partition(Linux ext2), size(31mb), offset(502mb) - type: 131(0x83)(Linux ext2 filesystem) - size: 31mb #s(64196) s(1028223-1092418) - chs: (64/1/1)-(67/254/62)d (64/1/1)-(67/254/62)r - hex: 00 01 01 40 83 FE 3E 43 7F B0 0F 00 C4 FA 00 00 - - Possible partition(Linux swap), size(125mb), offset(533mb) - type: 130(0x82)(Linux swap or Solaris/x86) - size: 125mb #s(256976) s(1092483-1349458) - chs: (68/1/1)-(83/254/62)d (68/1/1)-(83/254/62)r - hex: 00 01 01 44 82 FE 3E 53 83 AB 10 00 D0 EB 03 00 -[ - During the scan phase all found partitions are listed by - their real type names. The Linux swap partition above is - recognized as Linux swap but will get the 0x82 partition - identifier which can be both a Solaris disklabel or a - Linux swap partition. - - When examing the hex values of the first primary partition - it can be seen that they are identical to the values of the - actual partition table (good guess) except for the first - value (0x80 vs. 0x00). This entry denotes the partition - 'boot' flag which cannot be guessed. -] -... -End scan. - -Checking partitions... -Partition(Primary 'big' DOS (> 32MB)): primary - Partition(Linux ext2 filesystem): logical - Partition(Linux swap or Solaris/x86): logical - Partition(Linux LVM physical volume): logical - Partition(Linux ext2 filesystem): logical - Partition(DOS or Windows 95 with 32 bit FAT, LBA): logical -Partition(FreeBSD/NetBSD/386BSD): primary -Partition(Linux LVM physical volume): primary -Ok. -[ - During the scan phase gpart gathers a simple list of possible - partitions, the check phase now tries to decide if found - extended partitions seem consistent, if partitions do not - overlap etc. Overlapping partitions are silently discarded, - all remaining ones are given an attribute 'primary', 'logical', - 'orphaned' or 'invalid'. If gpart is called like 'gpart -vv ...', - it also tells why it thinks a partition guess is invalid. - - If any inconsistencies are found, gpart prints the number - of remaining inconsistencies, otherwise it says 'Ok.' -] - -Guessed primary partition table: -Primary partition(1) - type: 006(0x06)(Primary 'big' DOS (> 32MB)) - size: 502mb #s(1028097) s(63-1028159) - chs: (0/1/1)-(63/254/63)d (0/1/1)-(63/254/63)r - hex: 00 01 01 00 06 FE 3F 3F 3F 00 00 00 01 B0 0F 00 - -Primary partition(2) - type: 005(0x05)(Extended DOS) - size: 6157mb #s(12611025) s(1028160-13639184) - chs: (64/0/1)-(848/254/63)d (64/0/1)-(848/254/63)r - hex: 00 00 01 40 05 FE FF 50 40 B0 0F 00 D1 6D C0 00 - -Primary partition(3) - type: 165(0xA5)(FreeBSD/NetBSD/386BSD) - size: 1396mb #s(2859570) s(13639185-16498754) - chs: (849/0/1)-(1023/254/63)d (849/0/1)-(1026/254/63)r - hex: 00 00 C1 51 A5 FE FF FF 11 1E D0 00 32 A2 2B 00 - -Primary partition(4) - type: 254(0xFE)(Linux LVM physical volume) - size: 1608mb #s(3293325) s(16498755-19792079) - chs: (1023/254/63)-(1023/254/63)d (1027/0/1)-(1231/254/63)r - hex: 00 FE FF FF FE FE FF FF 43 C0 FB 00 8D 40 32 00 -[ - This is a resulting primary partition table. Note that - the logical partition guesses were only used to create - the extended partition entry. Up to now gpart cannot - reconstruct a damaged logical partition chain itself. - - If a guessed primary partition table should be written to - some file or device the user must specify (via the '-W' - option) which partition gets the active (bootable) one. -] - - - - gpart README, Aug 1999, Michail Brzitwa diff -Nru gpart-0.2.2/README.md gpart-0.3/README.md --- gpart-0.2.2/README.md 1970-01-01 00:00:00.000000000 +0000 +++ gpart-0.3/README.md 2015-11-24 11:03:45.000000000 +0000 @@ -0,0 +1,211 @@ +# gpart + +[![Build Status](https://travis-ci.org/baruch/gpart.svg)](https://travis-ci.org/baruch/gpart) + +Gpart is a small tool which tries to guess what partitions +are on a PC type, MBR-partitioned hard disk in case the +primary partition table was damaged. + +Gpart works by scanning through the device (or file) given on +the command line on a sector basis. Each guessing module is +asked if it thinks a filesystem it knows about could start at +a given sector. Several filesystem guessing modules are built +in. + +Consult the manual page for command line options and usage. + + +## Installation + +See file *INSTALL*. + +## 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 + reiserfs | 0x83 | ReiserFS filesystem + hmlvm | 0xFE | Linux LVM physical volumes + qnx4 | 0x4F | QNX 4.x + beos | 0xEB | BeOS fs + xfs | 0x83 | SGI XFS filesystem + + + +## Guessing modules + +Each guessing module must provide three functions callable from +gpart: + + int xxx_init(disk_desc *d,g_module *m) + +> Initialisation function. Will be called before a scan. +> It should return the minimum number of bytes it wants +> to receive for a test. The module should set the +> description of the filesystem/partition type it handles +> in `g_module.m_desc`. If the filesystem/partition type +> included a partition table like first sector (like the +> \*BSD disklabels do), the flag `m_hasptbl` should be set. +> Another flag is `m_notinext` which means the tested type +> cannot reside in a logical partition. + + int xxx_term(disk_desc *d) + +> Termination/cleanup function, called after the scanning +> of the device has been done. + + int xxx_gfun(disk_desc *d,g_module *m) + +> The actual guessing function, called from within the +> scan loop. It should test the plausibility of the +> given sectors, and return its guess in `m->m_guess` (a +> probability between 0 and 1). See existing modules +> for examples. +> +> The given file descriptor `d->d_fd` can be used for seeking +> and reading (see e.g. *gm_ext2.c* which tries to read +> the first spare superblock). If a module is convinced +> that it has found a filesystem/partition start it should +> fill in the assumed begin and size of the partition. +> +> The test performed should not be too pedantic, for +> instance it should not be relied upon that the file- +> system is clean/was properly unmounted. On the other +> hand too much tolerance leads to misguided guesses, +> so a golden middle way must be found. + + +## Output explanation + +Here is a sample `gpart -v` run on my first IDE hard disk +(comments in block-quotes): + + dev(/dev/hda) mss(512) chs(1232/255/63)(LBA) #s(19792080) size(9664mb) + +> `mss` is the medium sector size, `chs` the geometry retrieved +> from the OS (or from the command line), `#s` is the total +> sector count. + + Primary partition(1) + type: 006(0x06)(Primary 'big' DOS (> 32MB)) (BOOT) + size: 502mb #s(1028097) s(63-1028159) + chs: (0/1/1)-(63/254/63)d (0/1/1)-(63/254/63)r + hex: 80 01 01 00 06 FE 3F 3F 3F 00 00 00 01 B0 0F 00 + +> `size`: the size of the partition in megabytes, number of +> sectors and the sector range. +> `chs`: the partition table chs range (`d`) and the real one +> (`r`). If the number of cylinders is less than 1024, both +> are identical. +> `hex`: the hexadecimal representation of the partition entry +> as found in the partition table. + +... + + Begin scan... + Possible partition(DOS FAT), size(502mb), offset(0mb) + type: 006(0x06)(Primary 'big' DOS (> 32MB)) + size: 502mb #s(1028097) s(63-1028159) + chs: (0/1/1)-(63/254/63)d (0/1/1)-(63/254/63)r + hex: 00 01 01 00 06 FE 3F 3F 3F 00 00 00 01 B0 0F 00 + + Possible extended partition at offset(502mb) + Possible partition(Linux ext2), size(31mb), offset(502mb) + type: 131(0x83)(Linux ext2 filesystem) + size: 31mb #s(64196) s(1028223-1092418) + chs: (64/1/1)-(67/254/62)d (64/1/1)-(67/254/62)r + hex: 00 01 01 40 83 FE 3E 43 7F B0 0F 00 C4 FA 00 00 + + Possible partition(Linux swap), size(125mb), offset(533mb) + type: 130(0x82)(Linux swap or Solaris/x86) + size: 125mb #s(256976) s(1092483-1349458) + chs: (68/1/1)-(83/254/62)d (68/1/1)-(83/254/62)r + hex: 00 01 01 44 82 FE 3E 53 83 AB 10 00 D0 EB 03 00 + +> During the scan phase all found partitions are listed by +> their real type names. The Linux swap partition above is +> recognized as Linux swap but will get the 0x82 partition +> identifier which can be both a Solaris disklabel or a +> Linux swap partition. +> +> When examining the hex values of the first primary partition +> it can be seen that they are identical to the values of the +> actual partition table (good guess) except for the first +> value (0x80 vs. 0x00). This entry denotes the partition +> 'boot' flag which cannot be guessed. + +... + + End scan. + + Checking partitions... + Partition(Primary 'big' DOS (> 32MB)): primary + Partition(Linux ext2 filesystem): logical + Partition(Linux swap or Solaris/x86): logical + Partition(Linux LVM physical volume): logical + Partition(Linux ext2 filesystem): logical + Partition(DOS or Windows 95 with 32 bit FAT, LBA): logical + Partition(FreeBSD/NetBSD/386BSD): primary + Partition(Linux LVM physical volume): primary + Ok. + +> During the scan phase gpart gathers a simple list of possible +> partitions, the check phase now tries to decide if found +> extended partitions seem consistent, if partitions do not +> overlap etc. Overlapping partitions are silently discarded, +> all remaining ones are given an attribute 'primary', 'logical', +> 'orphaned' or 'invalid'. If gpart is called like `gpart -vv ...`, +> it also tells why it thinks a partition guess is invalid. +> +> If any inconsistencies are found, gpart prints the number +> of remaining inconsistencies, otherwise it says 'Ok.' + + Guessed primary partition table: + Primary partition(1) + type: 006(0x06)(Primary 'big' DOS (> 32MB)) + size: 502mb #s(1028097) s(63-1028159) + chs: (0/1/1)-(63/254/63)d (0/1/1)-(63/254/63)r + hex: 00 01 01 00 06 FE 3F 3F 3F 00 00 00 01 B0 0F 00 + + Primary partition(2) + type: 005(0x05)(Extended DOS) + size: 6157mb #s(12611025) s(1028160-13639184) + chs: (64/0/1)-(848/254/63)d (64/0/1)-(848/254/63)r + hex: 00 00 01 40 05 FE FF 50 40 B0 0F 00 D1 6D C0 00 + + Primary partition(3) + type: 165(0xA5)(FreeBSD/NetBSD/386BSD) + size: 1396mb #s(2859570) s(13639185-16498754) + chs: (849/0/1)-(1023/254/63)d (849/0/1)-(1026/254/63)r + hex: 00 00 C1 51 A5 FE FF FF 11 1E D0 00 32 A2 2B 00 + + Primary partition(4) + type: 254(0xFE)(Linux LVM physical volume) + size: 1608mb #s(3293325) s(16498755-19792079) + chs: (1023/254/63)-(1023/254/63)d (1027/0/1)-(1231/254/63)r + hex: 00 FE FF FF FE FE FF FF 43 C0 FB 00 8D 40 32 00 + +> This is a resulting primary partition table. Note that +> the logical partition guesses were only used to create +> the extended partition entry. Up to now gpart cannot +> reconstruct a damaged logical partition chain itself. +> +> If a guessed primary partition table should be written to +> some file or device the user must specify (via the `-W` +> option) which partition gets the active (bootable) one. + +## Author + +gpart README, Aug 1999, Michail Brzitwa diff -Nru gpart-0.2.2/src/gm_beos.c gpart-0.3/src/gm_beos.c --- gpart-0.2.2/src/gm_beos.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_beos.c 2015-11-24 11:03:45.000000000 +0000 @@ -22,9 +22,6 @@ #include -static const char rcsid[] = "$Id: gm_beos.c,v 1.2 2001/02/07 18:08:08 mb Exp mb $"; - - int beos_init(disk_desc *d,g_module *m) { if ((d == 0) || (m == 0)) diff -Nru gpart-0.2.2/src/gm_bsddl.c gpart-0.3/src/gm_bsddl.c --- gpart-0.2.2/src/gm_bsddl.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_bsddl.c 2015-11-24 11:03:45.000000000 +0000 @@ -17,8 +17,6 @@ #include "gpart.h" #include "gm_bsddl.h" -static const char rcsid[] = "$Id: gm_bsddl.c,v 1.6 2001/02/07 18:08:08 mb Exp mb $"; - int bsddl_init(disk_desc *d,g_module *m) { diff -Nru gpart-0.2.2/src/gm_btrfs.c gpart-0.3/src/gm_btrfs.c --- gpart-0.2.2/src/gm_btrfs.c 1970-01-01 00:00:00.000000000 +0000 +++ gpart-0.3/src/gm_btrfs.c 2015-11-24 11:03:45.000000000 +0000 @@ -0,0 +1,74 @@ +/* + * gm_btrfs.c -- gpart Linux Btrfs volume guessing module + * + * gpart (c) 1999-2001 Michail Brzitwa + * 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: 20.11.2015 + * + */ + +#include +#include +#include +#include "gpart.h" +#include "gm_btrfs.h" + + +int btrfs_init(disk_desc *d,g_module *m) +{ + if ((d == 0) || (m == 0)) + return (0); + + m->m_desc = "Btrfs volume"; + return BTRFS_SUPER_INFO_OFFSET + BTRFS_SUPER_INFO_SIZE; +} + +int btrfs_term(disk_desc *d) +{ + return (1); +} + +int btrfs_gfun(disk_desc *d,g_module *m) +{ + struct btrfs_super_block *sb; + dos_part_entry *pt = &m->m_part; + s64_t psize; + + m->m_guess = GM_NO; + sb = (struct btrfs_super_block*) + (d->d_sbuf + BTRFS_SUPER_INFO_OFFSET); + + if (le64toh(sb->magic) != BTRFS_MAGIC) + return 1; + + if (memcmp(sb->fsid, sb->dev_item.fsid, BTRFS_FSID_SIZE)) + return 1; + + psize = le64toh(sb->dev_item.total_bytes); + if (psize > btrfs_sb_offset(1)) { + struct btrfs_super_block sb_copy; + if (l64seek(d->d_fd, + d->d_nsb * d->d_ssize + btrfs_sb_offset(1), + SEEK_SET) == -1) + pr(FATAL,"btrfs: cannot seek: %s", strerror(errno)); + read(d->d_fd, &sb_copy, sizeof(sb_copy)); + if (le64toh(sb_copy.magic) != BTRFS_MAGIC || + memcmp(sb->fsid, sb_copy.fsid, BTRFS_FSID_SIZE)) { + pr(MSG,"btrfs: superblock copy mismatch\n"); + return 1; + } + } + + m->m_guess = GM_YES; + pt->p_start = d->d_nsb; + pt->p_size = psize / d->d_ssize; + pt->p_typ = 0x83; + + return 1; +} diff -Nru gpart-0.2.2/src/gm_btrfs.h gpart-0.3/src/gm_btrfs.h --- gpart-0.2.2/src/gm_btrfs.h 1970-01-01 00:00:00.000000000 +0000 +++ gpart-0.3/src/gm_btrfs.h 2015-11-24 11:03:45.000000000 +0000 @@ -0,0 +1,175 @@ +/* + * gm_btrfs.h -- gpart Btrfs volume guessing module header + * + * gpart (c) 1999-2001 Michail Brzitwa + * 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: 20.11.2015 + * Modified: + * + */ + +#ifndef _GM_BTRFS_H +#define _GM_BTRFS_H + +/* + * structs & defines gathered from btrfs-progs + */ + +#if !defined(__FreeBSD__) +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#endif + +typedef uint64_t __le64; +typedef uint32_t __le32; +typedef uint16_t __le16; +typedef uint8_t u8; + +#define BTRFS_SUPER_INFO_OFFSET (64 * 1024) +#define BTRFS_SUPER_INFO_SIZE 4096 +#define btrfs_sb_offset(i) ((i) ? ((16*1024) << (BTRFS_SUPER_MIRROR_SHIFT * (i))) : BTRFS_SUPER_INFO_SIZE) +#define BTRFS_SUPER_MIRROR_SHIFT 12 +#define BTRFS_CSUM_SIZE 32 +#define BTRFS_FSID_SIZE 16 +#define BTRFS_UUID_SIZE 16 +#define BTRFS_MAGIC 0x4D5F53665248425FULL +#define BTRFS_SYSTEM_CHUNK_ARRAY_SIZE 2048 +#define BTRFS_LABEL_SIZE 256 + +#define BTRFS_NUM_BACKUP_ROOTS 4 +struct btrfs_root_backup { + __le64 tree_root; + __le64 tree_root_gen; + + __le64 chunk_root; + __le64 chunk_root_gen; + + __le64 extent_root; + __le64 extent_root_gen; + + __le64 fs_root; + __le64 fs_root_gen; + + __le64 dev_root; + __le64 dev_root_gen; + + __le64 csum_root; + __le64 csum_root_gen; + + __le64 total_bytes; + __le64 bytes_used; + __le64 num_devices; + /* future */ + __le64 unsed_64[4]; + + u8 tree_root_level; + u8 chunk_root_level; + u8 extent_root_level; + u8 fs_root_level; + u8 dev_root_level; + u8 csum_root_level; + /* future and to align */ + u8 unused_8[10]; +} __attribute__ ((__packed__)); + +#define BTRFS_UUID_SIZE 16 +struct btrfs_dev_item { + /* the internal btrfs device id */ + __le64 devid; + + /* size of the device */ + __le64 total_bytes; + + /* bytes used */ + __le64 bytes_used; + + /* optimal io alignment for this device */ + __le32 io_align; + + /* optimal io width for this device */ + __le32 io_width; + + /* minimal io size for this device */ + __le32 sector_size; + + /* type and info about this device */ + __le64 type; + + /* expected generation for this device */ + __le64 generation; + + /* + * starting byte of this partition on the device, + * to allowr for stripe alignment in the future + */ + __le64 start_offset; + + /* grouping information for allocation decisions */ + __le32 dev_group; + + /* seek speed 0-100 where 100 is fastest */ + u8 seek_speed; + + /* bandwidth 0-100 where 100 is fastest */ + u8 bandwidth; + + /* btrfs generated uuid for this device */ + u8 uuid[BTRFS_UUID_SIZE]; + + /* uuid of FS who owns this device */ + u8 fsid[BTRFS_UUID_SIZE]; +} __attribute__ ((__packed__)); + +struct btrfs_super_block { + u8 csum[BTRFS_CSUM_SIZE]; + /* the first 3 fields must match struct btrfs_header */ + u8 fsid[BTRFS_FSID_SIZE]; /* FS specific uuid */ + __le64 bytenr; /* this block number */ + __le64 flags; + /* allowed to be different from the btrfs_header from here own down */ + __le64 magic; + __le64 generation; + __le64 root; + __le64 chunk_root; + __le64 log_root; + + /* this will help find the new super based on the log root */ + __le64 log_root_transid; + __le64 total_bytes; + __le64 bytes_used; + __le64 root_dir_objectid; + __le64 num_devices; + __le32 sectorsize; + __le32 nodesize; + __le32 leafsize; + __le32 stripesize; + __le32 sys_chunk_array_size; + __le64 chunk_root_generation; + __le64 compat_flags; + __le64 compat_ro_flags; + __le64 incompat_flags; + __le16 csum_type; + u8 root_level; + u8 chunk_root_level; + u8 log_root_level; + struct btrfs_dev_item dev_item; + + char label[BTRFS_LABEL_SIZE]; + + __le64 cache_generation; + __le64 uuid_tree_generation; + + /* future expansion */ + __le64 reserved[30]; + u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE]; + struct btrfs_root_backup super_roots[BTRFS_NUM_BACKUP_ROOTS]; +} __attribute__ ((__packed__)); + +#endif /* _GM_BTRFS_H */ diff -Nru gpart-0.2.2/src/gm_ext2.c gpart-0.3/src/gm_ext2.c --- gpart-0.2.2/src/gm_ext2.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_ext2.c 2015-11-24 11:03:45.000000000 +0000 @@ -27,8 +27,6 @@ #include "gpart.h" #include "gm_ext2.h" -static const char rcsid[] = "$Id: gm_ext2.c,v 1.8 2001/02/07 18:08:08 mb Exp mb $"; - int ext2_init(disk_desc *d,g_module *m) { diff -Nru gpart-0.2.2/src/gm_fat.c gpart-0.3/src/gm_fat.c --- gpart-0.2.2/src/gm_fat.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_fat.c 2015-11-24 11:03:45.000000000 +0000 @@ -17,8 +17,6 @@ #include "gpart.h" #include "gm_fat.h" -static const char rcsid[] = "$Id: gm_fat.c,v 1.6 2001/02/07 18:08:08 mb Exp mb $"; - int fat_init(disk_desc *d,g_module *m) { @@ -60,12 +58,12 @@ */ pt->p_start = d->d_nsb; - nsecs = le16(*(unsigned short *)sb->sectors); + nsecs = le16(sb->sectors); if (nsecs == 0) nsecs = le32(sb->total_sect); if (nsecs == 0) return (1); - sectsize = le16(*(unsigned short *)sb->sector_size); + sectsize = le16(sb->sector_size); if ((d->d_sbuf[0x39] == '1') && (d->d_sbuf[0x3a] == '2')) fat12 = 1; if (sb->fat_length == 0) diff -Nru gpart-0.2.2/src/gm_fat.h gpart-0.3/src/gm_fat.h --- gpart-0.2.2/src/gm_fat.h 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_fat.h 2015-11-24 11:03:45.000000000 +0000 @@ -39,12 +39,12 @@ __s8 ignored[3]; /* Boot strap short or near jump */ __s8 system_id[8]; /* Name - can be used to special case partition manager volumes */ - __u8 sector_size[2]; /* bytes per logical sector */ + __u16 sector_size; /* bytes per logical sector */ __u8 cluster_size; /* sectors/cluster */ __u16 reserved; /* reserved sectors */ __u8 fats; /* number of FATs */ __u8 dir_entries[2]; /* root directory entries */ - __u8 sectors[2]; /* number of sectors */ + __u16 sectors; /* number of sectors */ __u8 media; /* media code (unused) */ __u16 fat_length; /* sectors/FAT */ __u16 secs_track; /* sectors per track */ diff -Nru gpart-0.2.2/src/gm_hmlvm.c gpart-0.3/src/gm_hmlvm.c --- gpart-0.2.2/src/gm_hmlvm.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_hmlvm.c 2015-11-24 11:03:45.000000000 +0000 @@ -20,8 +20,6 @@ #include "gpart.h" #include "gm_hmlvm.h" -static const char rcsid[] = "$Id: gm_hmlvm.c,v 1.3 2001/02/07 18:08:08 mb Exp mb $"; - int hmlvm_init(disk_desc *d,g_module *m) { diff -Nru gpart-0.2.2/src/gm_hpfs.c gpart-0.3/src/gm_hpfs.c --- gpart-0.2.2/src/gm_hpfs.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_hpfs.c 2015-11-24 11:03:45.000000000 +0000 @@ -22,8 +22,6 @@ #include "gpart.h" #include "gm_hpfs.h" -static const char rcsid[] = "$Id: gm_hpfs.c,v 1.8 2001/02/07 18:08:08 mb Exp mb $"; - #define OS2SECTSIZE 512 @@ -58,7 +56,7 @@ if ( (bb->sig_28h == 0x28) && (strncmp((char *)bb->sig_hpfs,"HPFS ",8) == 0) && (bb->magic == le16(0xaa55)) && - (*(unsigned short *)bb->bytes_per_sector == le16(OS2SECTSIZE))) + (bb->bytes_per_sector == le16(OS2SECTSIZE))) { /* * looks like a hpfs boot sector. Test hpfs superblock diff -Nru gpart-0.2.2/src/gm_hpfs.h gpart-0.3/src/gm_hpfs.h --- gpart-0.2.2/src/gm_hpfs.h 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_hpfs.h 2015-11-24 11:03:45.000000000 +0000 @@ -42,7 +42,7 @@ { unsigned char jmp[3]; unsigned char oem_id[8]; - unsigned char bytes_per_sector[2]; /* 512 */ + unsigned short bytes_per_sector; /* 512 */ unsigned char sectors_per_cluster; unsigned char n_reserved_sectors[2]; unsigned char n_fats; diff -Nru gpart-0.2.2/src/gm_lswap.c gpart-0.3/src/gm_lswap.c --- gpart-0.2.2/src/gm_lswap.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_lswap.c 2015-11-24 11:03:45.000000000 +0000 @@ -19,7 +19,6 @@ #include "gpart.h" -static const char rcsid[] = "$Id: gm_lswap.c,v 1.8 2001/02/07 18:08:08 mb Exp mb $"; static char *sigs[] = { "SWAP-SPACE", "SWAPSPACE2" }; static int pszs[] = { 4096, 8192 }; static int siglen = 10; diff -Nru gpart-0.2.2/src/gm_lvm2.c gpart-0.3/src/gm_lvm2.c --- gpart-0.2.2/src/gm_lvm2.c 1970-01-01 00:00:00.000000000 +0000 +++ gpart-0.3/src/gm_lvm2.c 2015-11-24 11:03:45.000000000 +0000 @@ -0,0 +1,66 @@ +/* + * gm_lvm2.c -- gpart Linux LVM2 physical volume guessing module + * + * gpart (c) 1999-2001 Michail Brzitwa + * 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: 20.11.2015 + * + */ + +#include +#include +#include "gpart.h" +#include "gm_lvm2.h" + + +int lvm2_init(disk_desc *d,g_module *m) +{ + if ((d == 0) || (m == 0)) + return (0); + + m->m_desc = "Linux LVM2 physical volume"; + return SECTOR_SIZE + LABEL_SIZE; +} + + + +int lvm2_term(disk_desc *d) +{ + return (1); +} + + + +int lvm2_gfun(disk_desc *d,g_module *m) +{ + struct label_header *lh; + struct pv_header *pvh; + dos_part_entry *pt = &m->m_part; + s64_t pv_size; + byte_t *p = d->d_sbuf + SECTOR_SIZE; + + m->m_guess = GM_NO; + lh = (struct label_header*)p; + if (strncmp((char*)lh->id, LABEL_ID, sizeof(lh->id)) || + strncmp((char*)lh->type, LVM2_LABEL, sizeof(lh->type))) + return 1; + + pvh = (struct pv_header*) ((char*)lh + le32toh(lh->offset_xl)); + pv_size = le64toh(pvh->device_size_xl); + pv_size /= d->d_ssize; + if (d->d_nsecs != 0 && pv_size > d->d_nsecs - d->d_nsb) + return 1; + + m->m_guess = GM_YES; + pt->p_start = d->d_nsb; + pt->p_size = pv_size; + pt->p_typ = 0x8E; + + return 1; +} diff -Nru gpart-0.2.2/src/gm_lvm2.h gpart-0.3/src/gm_lvm2.h --- gpart-0.2.2/src/gm_lvm2.h 1970-01-01 00:00:00.000000000 +0000 +++ gpart-0.3/src/gm_lvm2.h 2015-11-24 11:03:45.000000000 +0000 @@ -0,0 +1,65 @@ +/* + * gm_lvm2.h -- gpart Linux LVM physical volume guessing module header + * + * gpart (c) 1999-2001 Michail Brzitwa + * 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: 19.11.2015 + * Modified: + * + */ + +#ifndef _GM_LVM2_H +#define _GM_LVM2_H +#include + +/* + * structs & defines gathered from LVM2 + */ + +#if !defined(__FreeBSD__) +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#endif + +#define ID_LEN 32 +#define SECTOR_SHIFT 9 +#define SECTOR_SIZE (1 << SECTOR_SHIFT) +#define LABEL_ID "LABELONE" +#define LABEL_SIZE SECTOR_SIZE +#define LABEL_SCAN_SECTORS 4L +#define LABEL_SCAN_SIZE (LABEL_SCAN_SECTORS << SECTOR_SHIFT) +#define LVM2_LABEL "LVM2 001" + +/* On disk - 32 bytes */ +struct label_header { + int8_t id[8]; /* LABELONE */ + uint64_t sector_xl; /* Sector number of this label */ + uint32_t crc_xl; /* From next field to end of sector */ + uint32_t offset_xl; /* Offset from start of struct to contents */ + int8_t type[8]; /* LVM2 001 */ +} __attribute__ ((packed)); + +struct disk_locn { + uint64_t offset; /* Offset in bytes to start sector */ + uint64_t size; /* Bytes */ +} __attribute__ ((packed)); + +struct pv_header { + int8_t pv_uuid[ID_LEN]; + + /* This size can be overridden if PV belongs to a VG */ + uint64_t device_size_xl; /* Bytes */ + + /* NULL-terminated list of data areas followed by */ + /* NULL-terminated list of metadata area headers */ + struct disk_locn disk_areas_xl[0]; /* Two lists */ +} __attribute__ ((packed)); + +#endif /* _GM_LVM2_H */ diff -Nru gpart-0.2.2/src/gm_minix.c gpart-0.3/src/gm_minix.c --- gpart-0.2.2/src/gm_minix.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_minix.c 2015-11-24 11:03:45.000000000 +0000 @@ -17,8 +17,6 @@ #include "gpart.h" #include "gm_minix.h" -static const char rcsid[] = "$Id: gm_minix.c,v 1.5 2001/02/07 18:08:08 mb Exp mb $"; - int minix_init(disk_desc *d,g_module *m) { diff -Nru gpart-0.2.2/src/gm_ntfs.c gpart-0.3/src/gm_ntfs.c --- gpart-0.2.2/src/gm_ntfs.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_ntfs.c 2015-11-24 11:03:45.000000000 +0000 @@ -21,8 +21,6 @@ #include "gpart.h" #include "gm_ntfs.h" -static const char rcsid[] = "$Id: gm_ntfs.c,v 1.6 2001/02/07 18:08:08 mb Exp mb $"; - #define NTFS_SECTSIZE 512 int ntfs_init(disk_desc *d,g_module *m) diff -Nru gpart-0.2.2/src/gmodules.h gpart-0.3/src/gmodules.h --- gpart-0.2.2/src/gmodules.h 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gmodules.h 2015-11-24 11:03:45.000000000 +0000 @@ -66,9 +66,11 @@ G_MODULE(minix) \ G_MODULE(beos) \ G_MODULE(ext2) \ + G_MODULE(btrfs) \ G_MODULE(fat) \ G_MODULE(s86dl) \ G_MODULE(hmlvm) \ + G_MODULE(lvm2) \ G_MODULE(xfs) #define G_MODULE(mod) int mod##_init(disk_desc *,g_module *), \ diff -Nru gpart-0.2.2/src/gm_qnx4.c gpart-0.3/src/gm_qnx4.c --- gpart-0.2.2/src/gm_qnx4.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_qnx4.c 2015-11-24 11:03:45.000000000 +0000 @@ -22,8 +22,6 @@ #include -static const char rcsid[] = "$Id: gm_qnx4.c,v 1.1 2001/01/29 17:11:34 mb Exp mb $"; - int qnx4_init(disk_desc *d,g_module *m) { diff -Nru gpart-0.2.2/src/gm_reiserfs.c gpart-0.3/src/gm_reiserfs.c --- gpart-0.2.2/src/gm_reiserfs.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_reiserfs.c 2015-11-24 11:03:45.000000000 +0000 @@ -22,8 +22,6 @@ #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) { diff -Nru gpart-0.2.2/src/gm_s86dl.c gpart-0.3/src/gm_s86dl.c --- gpart-0.2.2/src/gm_s86dl.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_s86dl.c 2015-11-24 11:03:45.000000000 +0000 @@ -17,8 +17,6 @@ #include "gpart.h" #include "gm_s86dl.h" -static const char rcsid[] = "$Id: gm_s86dl.c,v 1.6 2001/02/07 18:08:08 mb Exp mb $"; - int s86dl_init(disk_desc *d,g_module *m) { diff -Nru gpart-0.2.2/src/gm_xfs.c gpart-0.3/src/gm_xfs.c --- gpart-0.2.2/src/gm_xfs.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gm_xfs.c 2015-11-24 11:03:45.000000000 +0000 @@ -18,8 +18,6 @@ #include "gpart.h" #include "gm_xfs.h" -static const char rcsid[] = "$Id: gm_xfs.c,v 1.1 2001/02/07 18:08:08 mb Exp mb $"; - int xfs_init(disk_desc *d,g_module *m) { diff -Nru gpart-0.2.2/src/gpart.c gpart-0.3/src/gpart.c --- gpart-0.2.2/src/gpart.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/gpart.c 2015-11-24 11:03:45.000000000 +0000 @@ -59,7 +59,6 @@ #include "gpart.h" -static const char rcsid[] = "$Id: gpart.c,v 1.11 2001/02/07 18:08:08 mb Exp mb $"; static const char *gpart_version = PACKAGE_NAME " v" VERSION; diff -Nru gpart-0.2.2/src/l64seek.c gpart-0.3/src/l64seek.c --- gpart-0.2.2/src/l64seek.c 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/l64seek.c 2015-11-24 11:03:45.000000000 +0000 @@ -14,6 +14,7 @@ * */ +#include "config.h" /* for large file support */ #include "l64seek.h" diff -Nru gpart-0.2.2/src/Makefile.am gpart-0.3/src/Makefile.am --- gpart-0.2.2/src/Makefile.am 2015-03-12 15:41:49.000000000 +0000 +++ gpart-0.3/src/Makefile.am 2015-11-24 11:03:45.000000000 +0000 @@ -2,5 +2,5 @@ AM_LDFLAGS = sbin_PROGRAMS = gpart -gpart_SOURCES = disku.c gm_beos.c gm_bsddl.c gm_ext2.c gm_fat.c gm_hmlvm.c gm_hpfs.c gm_lswap.c gm_minix.c gm_ntfs.c gmodules.c gm_qnx4.c gm_reiserfs.c gm_s86dl.c gm_xfs.c gpart.c l64seek.c -EXTRA_DIST = errmsgs.h gm_bsddl.h gm_fat.h gm_hpfs.h gm_ntfs.h gm_qnx4.h gm_s86dl.h gpart.h gm_beos.h gm_ext2.h gm_hmlvm.h gm_minix.h gmodules.h gm_reiserfs.h gm_xfs.h l64seek.h +gpart_SOURCES = disku.c gm_beos.c gm_bsddl.c gm_ext2.c gm_btrfs.c gm_fat.c gm_hmlvm.c gm_lvm2.c gm_hpfs.c gm_lswap.c gm_minix.c gm_ntfs.c gmodules.c gm_qnx4.c gm_reiserfs.c gm_s86dl.c gm_xfs.c gpart.c l64seek.c +EXTRA_DIST = errmsgs.h gm_bsddl.h gm_fat.h gm_hpfs.h gm_ntfs.h gm_qnx4.h gm_s86dl.h gpart.h gm_beos.h gm_ext2.h gm_btrfs.h gm_hmlvm.h gm_lvm2.h gm_minix.h gmodules.h gm_reiserfs.h gm_xfs.h l64seek.h diff -Nru gpart-0.2.2/.travis.yml gpart-0.3/.travis.yml --- gpart-0.2.2/.travis.yml 1970-01-01 00:00:00.000000000 +0000 +++ gpart-0.3/.travis.yml 2015-11-24 11:03:45.000000000 +0000 @@ -0,0 +1,7 @@ +language: c + +script: ./autogen.sh && make + +compiler: + - gcc + - clang