-
-
Save carlocaione/4af4f8a9e8faeca86f0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules | |
index a65aab0..a48ecf6 100644 | |
--- a/data/80-udisks2.rules | |
+++ b/data/80-udisks2.rules | |
@@ -40,7 +40,8 @@ ENV{ID_VENDOR}=="*IOMEGA*", ENV{ID_MODEL}=="*ZIP*", ENV{ID_DRIVE_FLOPPY_ZIP}="1" | |
# TODO: figure out if the drive supports SD and SDHC and what the current | |
# kind of media is - right now we just assume SD | |
-KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ENV{DEVTYPE}=="disk", ENV{ID_DRIVE_FLASH_SD}="1", ENV{ID_DRIVE_MEDIA_FLASH_SD}="1" | |
+KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ENV{DEVTYPE}=="disk", ATTR{removable}=="1", ENV{ID_DRIVE_FLASH_SD}="1", ENV{ID_DRIVE_MEDIA_FLASH_SD}="1" | |
+KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ENV{DEVTYPE}=="disk", ATTR{removable}=="0", ENV{ID_DRIVE_NON_REMOVABLE}="1", ENV{ID_DRIVE_MEDIA_NON_REMOVABLE}="1" | |
# ditto for memstick | |
KERNEL=="mspblk[0-9]", SUBSYSTEMS=="memstick", ENV{DEVTYPE}=="disk", ENV{ID_DRIVE_FLASH_MS}="1", ENV{ID_DRIVE_MEDIA_FLASH_MS}="1" | |
diff --git a/src/udiskslinuxdrive.c b/src/udiskslinuxdrive.c | |
index b84204c..45bc7db 100644 | |
--- a/src/udiskslinuxdrive.c | |
+++ b/src/udiskslinuxdrive.c | |
@@ -356,6 +356,7 @@ static const struct | |
{ "ID_DRIVE_FLOPPY", "floppy", FALSE, TRUE }, | |
{ "ID_DRIVE_FLOPPY_ZIP", "floppy_zip", FALSE, TRUE }, | |
{ "ID_DRIVE_FLOPPY_JAZ", "floppy_jaz", FALSE, TRUE }, | |
+ { "ID_DRIVE_NON_REMOVABLE", "non_removable", TRUE, FALSE }, | |
{ "ID_CDROM", "optical_cd", FALSE, TRUE }, | |
{ "ID_CDROM_CD_R", "optical_cd_r", FALSE, TRUE }, | |
{ "ID_CDROM_CD_RW", "optical_cd_rw", FALSE, TRUE }, | |
@@ -396,6 +397,7 @@ static const struct | |
{ "ID_DRIVE_MEDIA_FLOPPY", "floppy" }, | |
{ "ID_DRIVE_MEDIA_FLOPPY_ZIP", "floppy_zip" }, | |
{ "ID_DRIVE_MEDIA_FLOPPY_JAZ", "floppy_jaz" }, | |
+ { "ID_DRIVE_NON_REMOVABLE", "non_removable" }, | |
{ "ID_CDROM_MEDIA_CD", "optical_cd" }, | |
{ "ID_CDROM_MEDIA_CD_R", "optical_cd_r" }, | |
{ "ID_CDROM_MEDIA_CD_RW", "optical_cd_rw" }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment