Browse Source

Improve description of GIO volumes

A single "GIO volume" is not descriptive enough to allow the user
to identify the corresponding volume, so we add either the label
or the UUID in the string.

In the future, we could even add the volume's size, as in
"External 2GB volume with label 'LABEL'".
develop
Damien Goutte-Gattat 5 years ago
parent
commit
489206682d
  1. 10
      src/scheme-gio.c

10
src/scheme-gio.c

@ -312,12 +312,18 @@ gfsec_scheme_gio_get_supports(gfsec_supports_list_t *list)
uuid = g_volume_get_uuid(volume);
if ( label ) {
gfsec_support_add(list, GFSEC_SCHEME_LABEL, label, xstrdup("GIO volume"));
char *desc;
xasprintf(&desc, "External volume with label '%s'", label);
gfsec_support_add(list, GFSEC_SCHEME_LABEL, label, desc);
n += 1;
}
if ( uuid ) {
gfsec_support_add(list, GFSEC_SCHEME_UUID, uuid, xstrdup("GIO volume"));
char *desc;
xasprintf(&desc, "External volume with UUID %s", uuid);
gfsec_support_add(list, GFSEC_SCHEME_UUID, uuid, desc);
n += 1;
}

Loading…
Cancel
Save