Commit Graph

2510 Commits

Author SHA1 Message Date
Mike Fleetwood cbf8bd741d Display whole disk file systems via partition table "none" (#741430)
For file systems which libparted recognises, when found on the whole
disk device, it reports with partition table "loop" and a partition
covering the whole disk.  GParted duly displays this to the user.

For file systems which libparted doesn't recognise it reports
"unrecognised disk label".  As of the latest libparted 3.2, these file
system aren't recognised and can't currently be shown when on the whole
disk device:

    BitLocker, Crypt LUKS, exFAT, F2FS, LVM2 Physical Volume,
    Linux Software RAID, ReFS, Reiser 4

So only when libparted doesn't recognise a file system on the whole disk
device and GParted does, either via blkid or it's internal code, display
this with partition table "none".

Bug 741430 - GParted cannot recognise LVM signature on unpartitioned
             drive
2015-03-09 10:17:22 -06:00
Mike Fleetwood ed827cf59a Create helper function set_partition_label_and_uuid() (#741430)
Move code which queries the file system label and UUID of a partition
into a separate helper function.

Bug 741430 - GParted cannot recognise LVM signature on unpartitioned
             drive
2015-03-09 10:17:22 -06:00
Mike Fleetwood 005a842f25 Support querying whole disk devices for signatures (#741430)
Make GParted_Core::get_filesystem() capable of recognising file system
signatures on whole disk devices.  Pass NULL for lp_partition to make it
read signatures from the whole disk rather than a specific partition.
Add debugging to test it works.

    # fgrep sdb /proc/partitions
       8    16    8388608 sdb
    # lvm pvcreate /dev/sdb
     Writing physical volume data to disk "/dev/sdb"
     Physical volume "/dev/sdb" successfully created
    # ./gpartedbin
    ======================
    libparted : 1.8.1
    ======================
    Unable to open /dev/sdb - unrecognised disk label.
    DEBUG: /dev/sdb (lvm2 pv)

Bug 741430 - GParted cannot recognise LVM signature on unpartitioned
             drive
2015-03-09 10:17:22 -06:00
Mike Fleetwood a9f08ddc7d Rename local variable to fsname in get_filesystem() (#741430)
Used 'fstype' as the name of local variable storing the FILESYSTEM
enumeration type.

'fs_type' was the name of the local variable storing the string with the
name of the file system type.  Rename it to 'fsname' to distinguish it
from the aforementioned variable.

Bug 741430 - GParted cannot recognise LVM signature on unpartitioned
             drive
2015-03-09 10:17:22 -06:00
Mike Fleetwood cb645b16cf Refactor GParted internal file system signature detection (#741430)
Refactor GParted internal file system signature detection to remove code
duplication.  There were 5 separate copies of code to: allocate a
buffer, open, read and close the device, free the buffer and compare the
signature.

Bug 741430 - GParted cannot recognise LVM signature on unpartitioned
             drive
2015-03-09 10:17:22 -06:00
Mike Fleetwood bd9c76f602 Reorder crypt-luks detection (#741430)
(1) Add recognition of LUKS signatures detected by blkid command, via
the FS_Info cache.

(2) Relocate internal GParted detection of LUKS signature to back after
libparted and blkid identification.  This reverses previous commit:

    7695593d21
    Improve crypt-luks detection (#578300)

Bug 578300 must have been caused by either: (1) reading stale data from
the whole disk device, or (2) formatting as LUKS over the top of ext3
leaving old signatures behind.  Case (1) has been resolved by commit:

    3bea067596
    Flush devices when scanning to prevent reading stale signatures
    (#723842)

Re-tested case (2) and find that no old signatures are left behind:

    # mkfs.ext3 /dev/sda8
    # wipefs /dev/sda8
    offset               type
    ----------------------------------------------------------------
    0x438                ext3   [filesystem]
                         UUID:  756dcd5f-73c5-4881-81ee-dc88e8b18f42
    # cryptsetup luksFormat /dev/sda8
    # wipefs /dev/sda8
    offset               type
    ----------------------------------------------------------------
    0x0                  crypto_LUKS   [crypto]
                         UUID:  de15ed1a-f461-46b7-803b-d0fd3b4bd680

Bug 741430 - GParted cannot recognise LVM signature on unpartitioned
             drive
2015-03-09 10:17:22 -06:00
Josef Andersson 956d169cae Updated Swedish translation 2015-03-08 12:36:28 +00:00
Stas Solovey 2dd504654a Updated Russian translation 2015-03-05 23:07:30 +00:00
Marco Ciampa 43913debaf Updated italian translation 2015-03-03 07:42:38 +01:00
Balázs Úr 40243fe6f3 Updated Hungarian translation 2015-03-01 16:31:30 +00:00
Γιάννης Κουτσούκος a615e9f0bf Updated Greek translation 2015-02-27 12:32:02 +00:00
Dušan Kazik e79faf7bdf Updated Slovak translation 2015-02-22 08:07:40 +00:00
Maria Mavridou 9984c296dd Updated Greek translation 2015-02-21 23:30:50 +00:00
Muhammet Kara 18c6116059 Updated Turkish translation 2015-02-16 13:15:50 +00:00
Enrico Nicoletto 5f9ca11da7 Updated Brazilian Portuguese translation 2015-02-11 15:33:06 +00:00
Piotr Drąg 78b7286753 Updated Polish translation 2015-02-08 14:12:18 +01:00
Mike Fleetwood 70cc6187d5 Fix double quote error creating XFS file systems (#744108)
Trying to create an XFS file system causes the following error and
the create new xfs file system step to never complete.

    # ./gpartedbin
    ======================
    libparted : 2.4
    ======================

    (gpartedbin:15572): glibmm-CRITICAL **:
    unhandled exception (type Glib::Error) in signal handler:
    domain: g-shell-error-quark
    code  : 0
    what  : Text ended before matching quote was found for ". (The text was 'mkfs.xfs -f -L "mylabel" " /dev/sdb8')

Creation of XFS file systems was broken by the extra stray double quote
added to the command before the device name, by commit:

    63aeb150ac
    Rename member variables and methods in Partition class (#741424)

Bug 744108 - Creating an XFS file system never completes
2015-02-07 10:33:12 -07:00
Marek Černocký 900e0b7300 Updated Czech translation 2015-02-03 19:27:47 +01:00
Mike Fleetwood 9294a10fbd Correct dialog title displaying libparted exceptions (#743825)
Encountered this dialog:

    Libparted Bug Found!

    (-) Invalid argument during seek for read on /dev/md1

                          [ Retry ] [ Cancel ] [ Ignore ]

After investigation found that GParted was asking libparted to read from
sector -1.  Libparted was actually reporting an error but GParted was
incorrectly displaying this as a bug.  This was because setting the
dialog title was falling through from the error case to the bug case.
Fix this.

Also provide unique titles for all libparted exception types so that
they can all be distinguished.

 *  List of exceptions from libparted: enum _PedExceptionType
    http://www.gnu.org/software/parted/api/group__PedException.html

Bug 743825 - gparted displaying dialog: libparted bug found!
2015-02-03 09:45:55 -07:00
Marek Černocký 89f85de5ac Updated Czech translation 2015-02-03 08:57:01 +01:00
Marek Černocký 7ab366af50 Updated Czech translation 2015-02-03 08:56:59 +01:00
Curtis Gedak ed9d537227 Add Mike Fleetwood to menu_help_about 2015-02-01 13:14:05 -07:00
Curtis Gedak db42cf78b1 Fix incorrect email address in help manual 2015-02-01 12:36:24 -07:00
Curtis Gedak 3b97063c23 Provide credit for help manual enhancements by Mike Fleetwood 2015-02-01 11:14:37 -07:00
Curtis Gedak 44eaabc57c Provide credit for patch by Michael Zimmermann
Provide credit for patch to add support for GPT partition names.
Also indicate significant effort by Sinlu Bes while we tried different
ideas for how GPT partition name support should work.
2015-02-01 11:01:41 -07:00
Mike Fleetwood 64d569cfb2 Describe the name partition operation in the Manual (#741424)
Bug 741424 - Add support for GPT partition names
2015-02-01 10:08:23 -07:00
Mike Fleetwood becbd7ac85 Use file system label terminology in the Manual (#741424)
Update the GParted Manual to reflect the change in terminology from
Partition Label to File System Label in the GParted GUI.  And make it
explicit that it is the file system label in a partition being changed.

Bug 741424 - Add support for GPT partition names
2015-02-01 10:08:23 -07:00
Michael Zimmermann 1f5841b4ad Add support for GPT partition names (#741424)
Embedded devices (Android) use GPT partition names to identify
partitions, instead of file system labels.  Add support for viewing and
changing them.

As partition names are used to provide unique identification they are
never copied when copying the contents of one partition to another.

Note that GNU/Linux uses file system labels, UUIDs or device names for
identification during the boot process and afterwards so while partition
names can be used, they are optional and purely for user information.

Bug 741424 - Add support for GPT partition names
2015-02-01 10:08:23 -07:00
Mike Fleetwood b278782ef6 Remove redundant second if condition in Display_Info()
Remove second inner if condition performing the same check as the outer
if:
    partition.type != GParted::TYPE_UNALLOCATED
2015-02-01 10:08:23 -07:00
Mike Fleetwood e1dc89cd11 Rename class to Dialog_FileSystem_Label (#741424)
class Dialog_Partition_Label   -> Dialog_FileSystem_Label
file Dialog_Partition_Label.h  -> Dialog_FileSystem_Label.h
file Dialog_Partition_Label.cc -> Dialog_FileSystem_Label.cc

Bug 741424 - Add support for GPT partition names
2015-02-01 10:08:23 -07:00
Mike Fleetwood 04450c577c Rename class to OperationLabelFileSystem (#741424)
class OperationLabelPartition   -> OperationLabelFileSystem
file OperationLabelPartition.h  -> OperationLabelFileSystem.h
file OperationLabelPartition.cc -> OperationLabelFileSystem.cc

Bug 741424 - Add support for GPT partition names
2015-02-01 10:08:23 -07:00
Mike Fleetwood 3630b9c83b Rename methods in GParted_Core and Win_GParted classes (#741424)
class GParted_Core:
    label_partition() -> label_filesystem()

class Win_GParted:
    allow_label_partition()    -> allow_label_filesystem()
    activate_label_partition() -> activate_label_filesystem()

Bug 741424 - Add support for GPT partition names
2015-02-01 10:08:23 -07:00
Mike Fleetwood 63aeb150ac Rename member variables and methods in Partition class (#741424)
class Partition:
    have_label    -> have_filesystem_label
    label         -> filesystem_label
    label_known() -> filesystem_label_known()
    get_label()   -> get_filesystem_label()
    set_label()   -> set_filesystem_label()

Bug 741424 - Add support for GPT partition names
2015-02-01 10:08:23 -07:00
Mike Fleetwood d480800600 Rename enum to OPERATION_LABEL_FILESYSTEM (#741424)
This and the following few commits rename variables, methods, classes,
etc from *label_partition* to *label_filesystem* so that the code also
reflects that it is the label of the file system that is being modified
and to separate it from the name partition operation about to be added.

enum OPERATION_LABEL_PARTITION -> OPERATION_LABEL_FILESYSTEM

Bug 741424 - Add support for GPT partition names
2015-02-01 10:08:23 -07:00
Mike Fleetwood 332a2e7a79 Rename Partition Label to File System Label in the GUI (#741424)
Rename the Partition Label concept to File System Label throughout the
GUI.  This is to better reflect that it is the label of the file system
that is being modified and to separate it from the Partition Name
concept about to be added.

Bug 741424 - Add support for GPT partition names
2015-02-01 10:08:23 -07:00
Mike Fleetwood 8b45219a2d Make swap usage match figures reported by swapon -s (#742647)
GParted reports used figure of active swap space from 4 KiB upwards,
actually 1 page, where as 'swapon -s' reports figures from 0 upwards.
This is because GParted is counting the 1 page swap space overhead as
used space.

    # sfdisk -s /dev/sdb1
    262144
    # mkswap /dev/sdb1
    # swapon /dev/sdb1
    # swapon -s
    Filename                Type            Size    Used    Priority
    /dev/sdb1               partition       262140  0       -1

For this case GParted reports used as 4 KiB.
(ptn size - swap size = 262144 - 262140 = 4)

Instead make GParted report used figure without any overhead from 0
upwards, matching what 'swapon -s' reports.

Bug 742647 - Swap usage doesn't match figures reported by swapon -s
2015-01-28 11:38:53 -07:00
Curtis Gedak d916cee115 Append -git to version for continuing development 2015-01-26 10:35:31 -07:00
Curtis Gedak 23091fbee7 ========== gparted-0.21.0 ========== 2015-01-26 10:01:46 -07:00
Curtis Gedak 570680826d Update copyright year 2015-01-26 09:48:36 -07:00
Enrico Nicoletto 4d0147a508 Updated Brazilian Portuguese translation 2015-01-26 10:56:19 +00:00
Alexandre Franke 68134e533a Updated French translation 2015-01-23 01:32:56 +00:00
Alexandre Franke a4d06f0a6b Updated French translation 2015-01-23 01:30:42 +00:00
Anders Jonsson 3fecfdd2c9 Updated Swedish translation 2015-01-22 21:40:29 +00:00
Milo Casagrande f3e5103282 Updated Italian translation 2015-01-20 07:32:46 +00:00
Daniel Mustieles 7a74aace5c Updated Spanish translation 2015-01-19 18:24:44 +01:00
Wolfgang Stöggl 7227181afd Updated German translation 2015-01-19 13:12:44 +00:00
Daniel Korostil 4fe21b1e93 Updated Ukrainian translation 2015-01-19 04:14:06 +02:00
Phillip Susi 8a952cd4a9 Fix off by one sector error in GParted internal block copy (#742920)
GParted's internal block copy has an off by one sector bug when the
source is before the destination; and the copy is performed backwards
from high block to low block.  It is as though the source and
destination partitions were both one sector earlier on the disk.

In ASCII art it it looks like this:

Initial layout:      x<--SRC--><--DST-->
Actually wrote:               x<--SRC--
Should have written:           <--SRC-->

Affects moving partitions too.

This bug has existed since commit:

    bd9e16f22f
    Thread the internal copy algorithm (#685740)

Effectively the last sector of the partition is missed and one sector
before the start of the partition is corrupted.  Most of the time file
systems don't get around to using the very last sector so didn't notice.

Bug 742920 - GParted internal copy is overstepping partition boundaries
2015-01-16 11:31:14 +00:00
Daniel Mustieles c97a462e7c Updated Spanish translation 2015-01-12 19:17:20 +01:00
Mike Fleetwood be8cc9c084 Allow creation of reiser4 file systems on Linux 3.x (#742511)
With reiser4progs 1.0.7 and earlier mkfs specifically checks for Linux
kernel 2.5 or 2.6.  On Linux 3.x it fails with the following warning:

    # mkfs.reiser4 --yes --label "" /dev/sdb1
    Warn : Linux 3.13.0-39-generic is detected. Reiser4 does not support
    such a platform. Use -f to force over.
    # echo $?
    8

This is fixed in reiser4progs 1.0.8 and later.  From the reiser4progs
SourceForce README.txt:

    . Do not ask for confirmation to work under Linux-3.X;

Found on Ubuntu 12.04 LTS and Ubuntu 14.04 LTS both with reiser4progs
1.0.7 and a Linux 3.x kernel.

Fix by adding "--force" flag to the mkfs command line.

Bug 742511 - Creation of reiser4 file systems fails with unsupported
             warning
2015-01-07 08:44:26 -07:00