Commit Graph

15 Commits

Author SHA1 Message Date
Ondrej Holy
88b8ebb5dd gio-tool: Hold GVolumeMonitor reference during operations
Releasing GVolumeMonitor before g_volume_mount finish cause that
g_volume_get_mount returns NULL, because the mount is not correctly
propagated to the volume.

https://gitlab.gnome.org/GNOME/glib/issues/1458
2018-08-02 11:35:48 +02:00
segfault
76b4d0ab3f Add support for TCRYPT volumes to GMountOperation
Add G_ASK_PASSWORD_TCRYPT flag to GAskPasswordFlags and add the
following properties to GMountOperation:

- hidden_volume [1]
- system_volume [2]
- pim [3]

[1] https://www.veracrypt.fr/en/Hidden%20Volume.html
[2] https://www.veracrypt.fr/en/System%20Encryption.html
[3] https://www.veracrypt.fr/en/Personal%20Iterations%20Multiplier%20(PIM).html
2018-06-21 15:32:04 +02:00
Philip Withnall
137ae066fe Merge branch 'wip/oholy/gio-mount-stop' into 'master'
gio-tool: Add support for stopping drives

See merge request GNOME/glib!17
2018-05-28 14:03:37 +00:00
Ondrej Holy
9ac1ba56a3 gio-tool: Fix GMountOperation leaks
GMountOperation is used on various places, but it is not properly unrefed.
Let's fix the leaks.
2018-05-28 14:44:07 +02:00
Ondrej Holy
fe9c6192c4 gio-tool: Add support for stopping drives
There is not currently an option for stopping drives, however it
would be really useful for testing. Let's add that possibility
for "gio mount".
2018-05-28 14:44:07 +02:00
Ondrej Holy
2cb2a617f1 gio-tool: Print help if no arguments are given
Help is usually printed from tools if no arguments are given and there
is not default action. However "gio mount" and "gio trash" just silently
return. Let's print "No locations given" error and show help consistently.
2018-05-28 13:50:55 +02:00
Ondrej Holy
bc365c9b4e gio-tool: Use "…" consistently
"gio help COMMAND" shows some arguments with "..." and some with "…",
which looks weird, e.g.:

$ gio help mount
gio mount [OPTION…] [LOCATION...]

Let's use "…" consitently.
2018-05-28 13:50:55 +02:00
Ondrej Holy
6863080c32 gio-tool: Fix alignment of monitor messages
Name of GMount/GVolume/GDrive is aligned in many cases in output messages,
except few cases. Let's unify the alignment.

https://bugzilla.gnome.org/show_bug.cgi?id=776169
2017-06-06 11:11:58 +02:00
Sébastien Wilmet
3bf4a720c3 gio/: LGPLv2+ -> LGPLv2.1+
Sub-directories inside gio/ already processed in a previous commit:
- fam/
- gdbus-2.0/ (which contains only codegen/)
- gvdb/
- inotify/
- tests/
- win32/
- xdgmime/

Other sub-directories inside gio/:
- completion/: no license headers
- kqueue/: not LGPL, BSD-style license

https://bugzilla.gnome.org/show_bug.cgi?id=776504
2017-05-29 19:53:34 +02:00
Ondrej Holy
fb7d2184a6 gio-tool: Do not leak GOptionContext
GOptionContext is freed only in case of success. Free the context
also in case of failure.

https://bugzilla.gnome.org/show_bug.cgi?id=776169
2017-04-10 10:14:04 +02:00
Ondrej Holy
292f10d053 gio-tool: Add g_drive_is_removable() support
The g_drive_is_removable() support was added recently in gio/gvfs
(see Bug 765900 and Bug 765457). It was also added in gvfs-mount,
but we forgot to add it also in gio-tool-mount.

https://bugzilla.gnome.org/show_bug.cgi?id=776169
2017-04-10 10:14:04 +02:00
Ondrej Holy
094613425e gio-tool: Return error if there are not any volumes to mount
Print error and return error code if device doesn't contain any
volumes to mount.

https://bugzilla.gnome.org/show_bug.cgi?id=776169
2017-04-10 10:14:04 +02:00
Ondrej Holy
0beeeb2ec9 gio-tool: Various fixes related to error messages
This patch contains the following changes:
- Print all errors with "gio: " prefix
- Print file uri in error for each tool allowing multiple locations
- Mark all error messages translatable
- Do not leak strings used in error messages
- Always start error messages with capital letter
- Unify some error messages across various tools
- Fix addional/missing new line characters

https://bugzilla.gnome.org/show_bug.cgi?id=776169
2017-04-10 10:14:04 +02:00
Philip Withnall
a9172c6d03 gio-tool: Fix memory leaks on error paths in mount command
Various GErrors were being leaked.

Coverity CID: 1357351 (amongst others)
2016-07-11 21:56:04 +01:00
Matthias Clasen
9edba4e49c Add a new gio commandline tool
This command collects the various commandline utilities that
are currently shipped in gvfs, and unifies them under a single,
command-style binary.

The tools just use GIO APIs, so it makes sense for them to live here.
2016-07-01 16:01:34 -04:00