Commit Graph

2245 Commits

Author SHA1 Message Date
Mike Fleetwood 21e166c949 Turn on resize2fs text progress bar (#709276)
Turn on the text progress bar for the resize2fs command.  Looks like:

    # resize2fs -p /dev/sda13 262144
    resize2fs 1.41.12 (17-May-2010)
    Resizing the filesystem on /dev/sda13 to 262144 (4k) blocks.
    Begin pass 2 (max = 97177)
    Relocating blocks             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Begin pass 3 (max = 80)
    Scanning inode table          XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Begin pass 4 (max = 5597)
    Updating inode references     XXXXXXXXX-------------------------------

Bug #709276 - Percentage indicator for subcommand
2013-10-03 10:23:46 -06:00
Mike Fleetwood 1b54123580 Enhance line discipline in PipeCapture::OnReadable() (#709276)
Add concept of cursor position within the current line, separate from
the end of the buffer.  This is so that programs which output a text
progress bar using backspace, such as resize2fs -p, are displayed
correctly.

Bug #709276 - Percentage indicator for subcommand
2013-10-03 10:23:46 -06:00
Mike Fleetwood 21aa90b847 Allow GParted to read the UUID from older btrfs-show command
All the code was there in btrfs::read_uuid() to read the UUID from the
btrfs-show command.  It just needed enabling.

This is only relevant when: (1) the blkid command is unavailable as
GParted primarily reads the UUID through the FS_Info cache using the
blkid command, and (2) the btrfs command is unavailable and the btrfs
module uses the older btrfs-show command instead.
2013-09-24 09:49:10 -06:00
Mike Fleetwood 293c8929a7 Actually display error message from statvfs() failure
Pass error_message parameter by reference to
get_mounted_filesystem_usage() so that the caller can access the
modified error message when required.
2013-09-24 09:49:10 -06:00
Mike Fleetwood 387b391d6d Add reporting of linux-swap usage (#708107)
For active swap space read the usage from /proc/swaps.  (Linux kernel
uses units of 1 KiB).  By definition inactive swap space is 100% free.

    $ cat /proc/swaps
    Filename                                Type            Size    Used    Priority
    /dev/sda2                               partition       5242876 430552  -1

Always set fs.read = FS::EXTERNAL even if /proc/swaps doesn't exist so
that an attempt is made to open the file generating a specific error, in
addition to the generic error.

    open("/proc/swaps", O_RDONLY): No such file or directory

    Unable to read the contents of this file system!
    Because of this some operations may be unavailable.

    The cause might be a missing software package.
    The following list of software packages is required for linux-
    swap file system support: util-linux.

Closes Bug #708107 - Usage of swap space is not reported
2013-09-24 09:49:10 -06:00
Daniel Șerbănescu f41bb75495 Updated Romanian Translation 2013-09-19 21:48:07 +02:00
Curtis Gedak a5bd5f28c5 Append -git to version for continuing development 2013-09-18 10:18:13 -06:00
Curtis Gedak 884761d9d9 Minor cleanup of whitespace and format of NEWS file 2013-09-18 10:16:03 -06:00
Curtis Gedak eb7afd6791 ========== gparted-0.16.2 ========== 2013-09-18 09:37:00 -06:00
Chao-Hsiung Liao cea294cb81 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2013-09-17 19:33:18 +08:00
Мирослав Николић 1d5fffd27a Updated Serbian translation 2013-09-17 05:34:40 +02:00
Seong-ho Cho 83a5180628 Updated Korean translation 2013-09-15 06:01:28 +09:00
Ville-Pekka Vainio 23c30a817c Finnish translation update by Jiri Grönroos 2013-09-14 23:01:52 +03:00
Joe Hansen a862cc90e9 Updated Danish translation 2013-09-11 22:38:24 +02:00
Daniel Mustieles 7f798b4deb Updated Spanish translation 2013-09-11 17:41:40 +02:00
Daniel Korostil 28755e9c2a Updated Ukrainian 2013-09-11 12:26:49 +03:00
Marek Černocký 0c37dd7d9f Updated Czech translation 2013-09-11 11:08:39 +02:00
Claude Paroz 72804e4880 Updated French manual translation 2013-09-11 09:09:35 +02:00
Andika Triwidada b677ef2d38 Updated Indonesian translation 2013-09-11 08:59:05 +07:00
Enrico Nicoletto ff62d13871 Updated Brazilian Portuguese translation for manual 2013-09-10 21:47:33 -03:00
Curtis Gedak 5e11bae44f Add changes for Force Cancel button to help manual (#707070)
A "Force Cancel" button and proper cancel support was added to
GParted 0.15.0 with the following commit:

  Add proper cancel support (#601239)
  89de9a5026

Part of Bug #707070 - Update Help Manual with GPT flags, Force Cancel
                      button, etc.
2013-09-10 19:52:04 +01:00
Curtis Gedak 13ba466154 Add list of gpt flags to help manual (#707070)
Part of Bug #707070 - Update Help Manual with GPT flags, Force Cancel
                      button, etc.
2013-09-10 19:52:04 +01:00
Curtis Gedak 71998a5013 Add diag flag to help manual and update manual metadata (#707070)
Part of Bug #707070 - Update Help Manual with GPT flags, Force Cancel
                      button, etc.
2013-09-10 19:52:04 +01:00
Yuri Myasoedov 55115bc126 Fixed bug in Russian translation 2013-09-10 21:57:45 +04:00
Mike Fleetwood 59a22673da Enable %age complete display from e2fsck command (#697662)
Enable the text progress bar and percentage complete from the e2fsck
command.  Looks like:

    # e2fsck -f -y -v -C 0 /dev/sda8
    e2fsck 1.41.12 (17-May-2010)
    Pass 1: Checking inodes, blocks, and sizes
    Pass 2: Checking directory structure
    test8: |=========================================               / 73.6%

Note that e2fsck deliberately brackets the progress bar with control-A
and control-B characters when it detects that it is not being run from a
terminal so that logsave(8) can exclude the progress bar from being
written to a log file.  As GParted doesn't run e2fsck via a pty it
receives these control characters.  Ignore them.

References:
Change e2fsck to bracket its progress bar output with ctrl-A and ctrl-B
http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?id=bc34d6be65cb93a65451ad209cfea2f98b03fd22

Don't print ^A and ^B chars when e2fsck is talking directly to a tty
http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?id=54a31a3b2e432c124aa03442f2983c4f4d4a974c

Closes Bug #697662 - Do not hide the progress of the tools used
2013-09-09 09:23:58 -06:00
Mike Fleetwood a8b699d896 Allow ntfsresize command to report real-time %age progress (#697662)
Remove the -P, no progress bar option, from the ntfsresize command.
This allows the command to display the %age complete on its output which
is displayed in the operation details dialog, updated in real time.
Possible since:
    Bug #685740 - Refactor to use asynchronous command execution

Bug #697662 - Do not hide the progress of the tools used
2013-09-09 09:23:58 -06:00
Mike Fleetwood 78c558c350 Also accept btrfs tools using IEC prefix multipliers (#706914)
Currently the btrfs command outputs figures to 2 decimal places followed
by an SI multiplier, e.g. 1.00GB.

This patch to btrfs-progs has been included in the integration
repository and will likely be included in the official btrfs-progs
repository at some point.  It changes btrfs-progs to use IEC
multipliers, e.g. 1.00GiB.  In fact multipliers already aren't used for
figures less than 1024.
    [PATCH] btrfs-progs: use IEC units for size
    http://permalink.gmane.org/gmane.comp.file-systems.btrfs/26888
    https://patchwork.kernel.org/patch/2825841/

Make GParted capable of also accepting IEC prefix multipliers, just "B"
for bytes and no multiplier, as well as an optional space between the
number and multiplier.  Therefore accept values like these:
    1.00GB         1.00 GB
    1.00GiB        1.00 GiB
    1073741824B    1073741824 B
    1073741824

Closes Bug #706914 - Prepare for btrfs tools using IEC prefix
                     multipliers
2013-08-29 10:20:52 -06:00
Fran Diéguez 510f6697e1 Updated Galician translations 2013-08-28 01:11:40 +02:00
Mike Fleetwood 246e05559d Clear btrfs file system super block mirror copies too (#705426)
With recent btrfs-progs, GParted failed to format a btrfs file system
over the top of an existing one.  Make btrfs failed with this error:

    # mkfs.btrfs /dev/sdb1
    ...
    /dev/sdb1 appears to contain an existing filesystem (btrfs).
    Use the -f option to force overwrite.

With this commit to btrfs-progs on 2013-02-19, mkfs.btrfs checks for
existing file system signatures, including all mirror copies of btrfs
super blocks, before writing to the partition.

    http://git.kernel.org/cgit/linux/kernel/git/mason/btrfs-progs.git/commit/?id=2a2d8e1962e8b6cda7b0a7584f6d2fb95d442cb6
    btrfs-progs: require mkfs -f force option to overwrite filesystem or partition table

Make GParted clear all the mirror copies of the btrfs file system super
blocks as erase_filesystem_signatures() is intended to prevent detection
of old signatures.  This also avoids having to determine if the -f
option to mkfs.btrfs is available before trying to use it.

Closes Bug #705426 - Formatting Existing BTRFS Partition as BTRFS Fails
                     Because mkfs.btrfs Is Not Run with "-f"
2013-08-26 10:16:01 -06:00
Curtis Gedak 51845b7799 Fix regression - linux-swap resize broken (#706604)
Unfortunately a regression was introduced with GParted 0.14.1 wherein
linux-swap grow and shrink operations were broken.  This regression was
a direct result of the following commit:

    Prevent file system grow when partition grow fails (#686668)
    fd96328920

The regression did not result in an error in the GUI, but rather the
linux-swap file system was not "resized" to the correct partition size.

The logic error introduced with the above commit listed has now been
fixed.

BACKGROUND INFORMATION ON LINUX-SWAP RESIZING

Currently no command line tools are available for resizing linux-swap.
However, since linux-swap does not contain data in the usual sense, we
simulate resizing linux-swap by re-creating (maximizing to fill
partition) the linux-swap file system with the same UUID and volume
label.  To work correctly, the linux-swap file system must be re-created
after the final partition resize action has occurred.

Closes Bug #706604 - Failure to properly grow or shrink linux-swap when
                     resizing
2013-08-24 16:17:08 +01:00
Mike Fleetwood 73a80db912 Ensure running GParted is named correctly under GNOME Shell (#705323)
Under GNOME Shell a running instance of GParted was getting named
"Gpartedbin".  Ultimately GNOME Shell [1] uses the WM_CLASS X Window
property [2], which GDK defaults from the executable name.

    $ xprop WM_NAME WM_CLASS
    (Click on running GParted window)
    WM_NAME(STRING) = "/dev/sda - GParted"
    WM_CLASS(STRING) = "gpartedbin", "Gpartedbin"

Set the Class name, second string of the WM_CLASS X Window property, to
"GParted".  (This prevents the use of the '--class' GTK+/GDK common
command line option [3] to override the class name, but I expect nobody
ever uses the option.  GNOME Terminal has the same limitation.  It also
has the same change setting the Class name [4]).

References:

[1] Application Based GNOME 3
    https://wiki.gnome.org/GnomeShell/ApplicationBased

[2] WM_CLASS Property, Inter-Client Communication Conventions Manual
    http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.5

[3] Running GTK+ Applications, Common command line options
    https://developer.gnome.org/gtk3/stable/gtk-running.html

[4] Bug #685742 - Window class of terminals doesn't match the desktop
    file name
    https://bugzilla.gnome.org/show_bug.cgi?id=685742
    https://git.gnome.org/browse/gnome-terminal/commit/?id=3370c0e51159f5be476b909e94ac05e5362dd28a

Closes Bug #705323 - Shows up as 'Gpartedbin' in GNOME Shell
2013-08-13 15:17:34 -06:00
Akom Chotiphantawanon b16d66c34b Updated Thai translation. 2013-08-10 18:08:49 +07:00
Seong-ho Cho ca570e0f02 Updated Korean translation 2013-08-04 17:23:38 +09:00
Mike Fleetwood 1ae03dee95 Recognise new dosfstools program names (#704629)
Dosfstools >= 3.0.18, released June 2013, renamed the programs thus:

    dosfslabel becomes fatlabel,
    dosfsck becomes fsck.fat,
    and mkdosfs becomes mkfs.fat.

Dosfstools creates symbolic links for the old names for backward
compatibility, but unfortunately the Debian dosfstools-3.0.22-1
(experimental) package doesn't include those symbolic links.  This
causes create, check and read unmounted FAT16/32 file systems to not be
supported.

Make GParted look for the new names first and the old names second.

Closes Bug #704629 - Program name changes in dosfstools 3.0.18+ break
                     FAT16/32 support
2013-07-27 11:32:20 -06:00
Dimitris Spingos 3fb1fa22a1 Added Greek translation 2013-07-19 16:33:03 +03:00
Curtis Gedak 916780ec0d Ensure active tense of menu option in en_CA translation
The menu option to mount a partition containing a file system should
be the active tense because choosing the menu option will perform the
action.

Changing:
   "_Mounted on" --> "_Mount on"
2013-07-05 00:50:28 -04:00
Curtis Gedak 2e637e3a51 Add missing colon to label in en_CA translation
"UUID" --> "UUID:"
2013-07-05 00:49:25 -04:00
Mike Fleetwood f77d4e65a9 Stop using locate in autogen.sh (#702040)
If the gnome-doc-utils package isn't installed and you try to compile
GParted from git it will fail with this:

    $ ./autogen.sh
    /usr/bin/gnome-autogen.sh
    Cannot find file: gnome-doc-utils.make
    You need to install gnome-doc-utils

After installing the gnome-doc-utils package the same error will be
reported again unless you also update the locate database.

Instead query the full path to the gnome-doc-utils.make file from the
gnome-doc-utils' pkg-config metadata.

Closes Bug #702040 - very strange gnome-doc-utils check in gparted
2013-06-14 10:17:02 -06:00
Curtis Gedak 4c9c70d697 Only permit one instance of GParted to execute at a time
Only one partition editing tool should be in use at any one point
in time.  If more than one is in use concurrently, then data loss
might occur through operations on common partitions or partition
tables.  As such, prevent multiple copies of GParted from running
at the same time.
2013-06-13 21:21:29 +01:00
Curtis Gedak 4c109df9b5 Use systemctl runtime mask to prevent automounting (#701676)
With the beta release of Fedora 19, invoking gparted appears to
automatically mount partitions.  The systemd daemon appears to be
performing the automounting.  Hence use systemctl runtime mask to
prevent this automounting from occurring.

Bug #701676 - gparted doesn't inhibit systemd mounting, leading to
              potential data loss
2013-06-13 21:21:29 +01:00
Sinlu Bes 20006e1f8e Add create_with_label flag to struct FS (#701569)
It was difficult to retrieve whether a filesystem's label can be set on reformat.

The read_label flag can't be used as it decides whether to use the logic in the filesystem class
rather than the fallback in GParted::set_device_partitions, to determine the label of a partition.

The create_with_label flag is NONE for file systems that we cannot format with a
label (or that we cannot format at all).
The value is usually EXTERNAL for file systems that we can format with a label.
2013-06-09 09:50:54 -06:00
Mike Fleetwood aed1fb58cf Remove unused read-only functionality from internal block copy
The read-only functionality is unused and the readonly parameter is
always false in copy_filesystem() and copy_blocks() methods.  This has
been the case since the copy simulation was dropped by commit:

    b9b4b2e55d
    Remove simulation pass ( read test ) on move
2013-06-05 10:57:39 -06:00
Mike Fleetwood 2b51d87147 Make include guards unique (#539297)
Include guards need to be unique within GParted code and all included
library header files.
    http://en.wikipedia.org/wiki/Include_guard#Difficulties

Use this model for all include guards:
    #ifndef GPARTED_FILE_NAME_H
    #define GPARTED_FILE_NAME_H
    ...
    #endif /* GPARTED_FILE_NAME_H */

Closes Bug #539297 - Make include guards unique
2013-06-05 10:57:39 -06:00
Curtis Gedak 8ed7155e6d Set NTFS minimum partition size to 2 MiB (#697848)
The minimum NTFS volume size supported by the ntfs-3g mkntfs command
is 1 MiB.  Since 1 extra sector is required for the backup NTFS boot
sector, an NTFS partition must be at least 1 MiB plus 1 sector.

To demonstrate, create a 1 MiB unformatted partition using MiB
alignment (/dev/sdd1), and then try to format the partition as NTFS.

# mkntfs -Q -v -L "ntfs-test" /dev/sdd1
Device is too small (1023kiB).  Minimum NTFS volume size is 1MiB.

For GParted this means a minimum NTFS partition size of 2 MiB since
the smallest unit in the GUI is MiB.

Bug #697848 - Failure to Create 1 MiB NTFS Partition
2013-05-30 21:33:11 +01:00
Mike Fleetwood 28d41d0d6a Place options before device name for the ntfsresize command
Place the size and noaction options before the device name when resizing
an NTFS file system to match the order documented in the manual page.
Example fixed command:

    # ntfsresize -P --force --force -s 104857600 --no-action /dev/sda11
2013-05-29 09:50:26 -06:00
Mike Fleetwood 3461413d28 Shrink file systems to exact size (#701075)
Ext[234] file systems were being shrunk 1 KiB too small.  Ntfs and
reiserfs file systems were being shrunk 1 byte too small.  The resultant
file systems were ending up 1 block smaller than they could have been.

This looks like an accidental leftover from when GParted use to:
1) Shrink the file system 1 cylinder too small
2) Shrink the partition
3) Grow the file system to fill the partition
Relevant commit:

    d663c3c277
    removed cylindersize buffering during resize from the filesystems

Closes Bug #701075 - Setting the backup boot sector when resizing NTFS
2013-05-29 09:50:26 -06:00
Curtis Gedak e66a6525f2 Add GPLv2+ license to gparted.in script source file
Note the license text of this file differs slightly from the C++
source code license text to indicate this file is a part of GParted.

See:  https://www.gnu.org/licenses/gpl-howto.html

    For programs that are more than one file, it is better to replace
    “this program” with the name of the program, and begin the
    statement with a line saying “This file is part of NAME”.
2013-05-28 20:53:04 +01:00
Curtis Gedak 50d2ac8027 Remove GNOME SVN from message text
GNOME is now managed under git revision control (not SVN).
Also missing dependencies can be installed in many ways.
2013-05-28 20:53:04 +01:00
Curtis Gedak ce8a34715a Add GNU All-Permissive License to autogen.sh 2013-05-28 20:53:04 +01:00
Mike Fleetwood 7d6adee516 Update licensing statement in the README file
Explicitly state that GParted is licensed under the GPLv2+ and the
GParted Manual is licensed under the GFDLv1.2+.
2013-05-27 11:08:39 -06:00