summaryrefslogtreecommitdiff
path: root/gio
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-29 10:27:09 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-29 10:27:09 +0900
commit40ed3381d56b5e6d3700e465b70085e6820fe787 (patch)
treed1d7a8ebffa33467c4230e2f4e85451fbc0dca81 /gio
parent585b698fad12e1c8676aba6a5d8e249355554d2b (diff)
downloadglib-40ed3381d56b5e6d3700e465b70085e6820fe787.tar.gz
glib-40ed3381d56b5e6d3700e465b70085e6820fe787.tar.bz2
glib-40ed3381d56b5e6d3700e465b70085e6820fe787.zip
Imported Upstream version 2.66.4upstream/2.66.4
Diffstat (limited to 'gio')
-rw-r--r--gio/gio-tool-info.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gio/gio-tool-info.c b/gio/gio-tool-info.c
index 7cf568370..a06263545 100644
--- a/gio/gio-tool-info.c
+++ b/gio/gio-tool-info.c
@@ -182,7 +182,8 @@ show_info (GFile *file, GFileInfo *info)
gchar *root_string = NULL;
gchar *mount;
gchar *fs;
- gchar *options;
+ const gchar *options;
+ gchar *options_string = NULL;
device = g_strescape (g_unix_mount_get_device_path (entry), NULL);
root = g_unix_mount_get_root_path (entry);
@@ -194,16 +195,22 @@ show_info (GFile *file, GFileInfo *info)
}
mount = g_strescape (g_unix_mount_get_mount_path (entry), NULL);
fs = g_strescape (g_unix_mount_get_fs_type (entry), NULL);
- options = g_strescape (g_unix_mount_get_options (entry), NULL);
+
+ options = g_unix_mount_get_options (entry);
+ if (options != NULL)
+ {
+ options_string = g_strescape (options, NULL);
+ }
g_print (_("unix mount: %s%s %s %s %s\n"), device,
- root_string ? root_string : "", mount, fs, options);
+ root_string ? root_string : "", mount, fs,
+ options_string ? options_string : "");
g_free (device);
g_free (root_string);
g_free (mount);
g_free (fs);
- g_free (options);
+ g_free (options_string);
g_unix_mount_free (entry);
}