[Xfce4-commits] [panel-plugins/xfce4-mount-plugin] 02/02: bug 9127 with a feature request for partition labels now resolved.
noreply at xfce.org
noreply at xfce.org
Fri Apr 25 01:19:09 CEST 2014
This is an automated email from the git hooks/post-receive script.
timystery pushed a commit to branch master
in repository panel-plugins/xfce4-mount-plugin.
commit a85ee2e99917401fdb0c6518c604d8d0adeea0e2
Author: Fabian <timystery at arcor.de>
Date: Fri Apr 25 01:18:20 2014 +0200
bug 9127 with a feature request for partition labels now resolved.
---
panel-plugin/devices.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index 1bd8880..44ffd38 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -183,8 +183,11 @@ char *
shorten_disk_name (const char *dev, gint len)
{
char *r, *lastchars, *firstchars;
- //if (strncmp(dev, "UUID", 4)==0 &&
- if (strlen(dev)>len) // len canot be set lower than 9
+ if (strncmp(dev, "LABEL=", 6)==0)
+ {
+ r = g_strdup(dev+6*sizeof(char));
+ }
+ else if (strlen(dev)>len) // len canot be set lower than 9
{
// we want at least 5 characters at the end so that trimmed UUIDs are still readable
lastchars = (char *) (dev + strlen(dev) - 5);
@@ -404,7 +407,7 @@ disks_new (gboolean include_NFSs, gboolean *showed_fstab_dialog, gint length)
for (pfstab = getfsent(); pfstab!=NULL; pfstab = getfsent())
{
has_valid_mount_device =
- g_str_has_prefix(pfstab->fs_spec, "/dev/") || g_str_has_prefix(pfstab->fs_spec, "UUID=");
+ g_str_has_prefix(pfstab->fs_spec, "/dev/") || g_str_has_prefix(pfstab->fs_spec, "UUID=") || g_str_has_prefix(pfstab->fs_spec, "LABEL=");
if (include_NFSs)
has_valid_mount_device = has_valid_mount_device |
@@ -723,7 +726,7 @@ disk_classify (char *device, char *mountpoint)
dc = REMOTE;
}
}
- /* it needs to be said _here_ that BSDs use cd0, cd1 etc., so we hope cd* works for cdrw, cdrom and cd0,1,... nd no other devices */
+ /* it needs to be said _here_ that BSDs use cd0, cd1 etc., so we hope cd* works for cdrw, cdrom and cd0,1,... nd no other devices */
else if ( strstr(device, "cd")
|| strstr(device, "dvd") || strstr(mountpoint, "cd") || strstr(mountpoint, "dvd")) {
dc = CD_DVD;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list