From 5819464fb11bcf60df12a52e094878848c52b1d1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 10 Jul 2009 18:31:07 +0200 Subject: [PATCH] hide recovery, boot, and hidden partitions from desktops Set DKD_PRESENTATION_HIDE for partitions which desktops should hide, such as EFI, Apple bootstrap, or recovery partitions. For recovery partitions is a direct port of the earlier hal fdis: http://cgit.freedesktop.org/hal/tree/fdi/policy/10osvendor/20-storage-methods.fdi#n80 Apple boostrap, EFI, and hidden partitions now don't rely on labels any more, but directly check partitioning schema (mbr, GUID) and types. libgdu evaluates this and exports it as device-presentation-hide property, which gvfs respects. https://bugs.freedesktop.org/show_bug.cgi?id=22707 --- data/95-devkit-disks.rules | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/data/95-devkit-disks.rules b/data/95-devkit-disks.rules index 7058897..07674a5 100644 --- a/data/95-devkit-disks.rules +++ b/data/95-devkit-disks.rules @@ -106,4 +106,29 @@ ENV{ID_VENDOR}=="*IOMEGA*", ENV{ID_MODEL}=="*ZIP*", ENV{ID_DRIVE_FLOPPY_ZIP}="1" ############################################################################################################## +# partitions which desktops should not display + +# Apple Bootstrap partitions +ENV{DKD_PARTITION_SCHEME}=="apm", ENV{DKD_PARTITION_TYPE}=="Apple_Bootstrap", ENV{DKD_PRESENTATION_HIDE}="1" + +# special MBR partition types (EFI, hidden, etc.) +# see http://www.win.tue.nl/~aeb/partitions/partition_types-1.html +ENV{DKD_PARTITION_SCHEME}=="mbr", \ + ENV{DKD_PARTITION_TYPE}=="0x00|0x11|0x14|0x16|0x17|0x1b|0x1c|0x1e|0x27|0x3d|0x84|0x8d|0x90|0x91|0x92|0x93|0x97|0x98|0x9a|0x9b|0xbb|0xc2|0xc3|0xdd|0xef", \ + ENV{DKD_PRESENTATION_HIDE}="1" + +# special GUID-identified partition types +# see http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs +ENV{DKD_PARTITION_SCHEME}=="gpt", \ + ENV{DKD_PARTITION_TYPE}=="C12A7328-F81F-11D2-BA4B-00A0C93EC93B|21686148-6449-6E6F-744E-656564454649", \ + ENV{DKD_PRESENTATION_HIDE}="1" + +# recovery partitions (taken from old hal rules) +ENV{ID_FS_TYPE}=="ntfs|vfat", \ + ENV{ID_FS_LABEL}=="RECOVERY|HP_RECOVERY|Recovery Partition|DellUtility|DellRestore|IBM_SERVICE|SERVICEV001|SERVICEV002", \ + ENV{DKD_PRESENTATION_HIDE}="1" + + +############################################################################################################## + LABEL="devkit_disks_end" -- 1.6.3.3