mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
Avoid redudant tests (#521851) Patch from Josselin Mouette
2008-03-14 Alexander Larsson <alexl@redhat.com> * gunixmounts.c: (guess_mount_type): Avoid redudant tests (#521851) Patch from Josselin Mouette svn path=/trunk/; revision=6710
This commit is contained in:
parent
6088f22d26
commit
240ba02786
@ -1,3 +1,10 @@
|
||||
2008-03-14 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gunixmounts.c:
|
||||
(guess_mount_type):
|
||||
Avoid redudant tests (#521851)
|
||||
Patch from Josselin Mouette
|
||||
|
||||
2008-03-14 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* gfilemonitor.c:
|
||||
|
@ -1598,27 +1598,10 @@ guess_mount_type (const char *mount_path,
|
||||
{
|
||||
basename = g_path_get_basename (mount_path);
|
||||
|
||||
if (g_str_has_prefix (basename, "cdrom") ||
|
||||
if (g_str_has_prefix (basename, "cdr") ||
|
||||
g_str_has_prefix (basename, "cdwriter") ||
|
||||
g_str_has_prefix (basename, "burn") ||
|
||||
g_str_has_prefix (basename, "cdr") ||
|
||||
g_str_has_prefix (basename, "cdrw") ||
|
||||
g_str_has_prefix (basename, "dvdrom") ||
|
||||
g_str_has_prefix (basename, "dvdram") ||
|
||||
g_str_has_prefix (basename, "dvdr") ||
|
||||
g_str_has_prefix (basename, "dvdrw") ||
|
||||
g_str_has_prefix (basename, "cdrom_dvdrom") ||
|
||||
g_str_has_prefix (basename, "cdrom_dvdram") ||
|
||||
g_str_has_prefix (basename, "cdrom_dvdr") ||
|
||||
g_str_has_prefix (basename, "cdrom_dvdrw") ||
|
||||
g_str_has_prefix (basename, "cdr_dvdrom") ||
|
||||
g_str_has_prefix (basename, "cdr_dvdram") ||
|
||||
g_str_has_prefix (basename, "cdr_dvdr") ||
|
||||
g_str_has_prefix (basename, "cdr_dvdrw") ||
|
||||
g_str_has_prefix (basename, "cdrw_dvdrom") ||
|
||||
g_str_has_prefix (basename, "cdrw_dvdram") ||
|
||||
g_str_has_prefix (basename, "cdrw_dvdr") ||
|
||||
g_str_has_prefix (basename, "cdrw_dvdrw"))
|
||||
g_str_has_prefix (basename, "dvdr"))
|
||||
type = G_UNIX_MOUNT_TYPE_CDROM;
|
||||
else if (g_str_has_prefix (basename, "floppy"))
|
||||
type = G_UNIX_MOUNT_TYPE_FLOPPY;
|
||||
|
Loading…
Reference in New Issue
Block a user