Comment 11 for bug 1618370

Revision history for this message
Rocko (rockorequin) wrote :

The patch for that commit works without any changes with the current gvfs in yakkety (1.28.2). With the patch applied I see the is_removable variable using the gvfs-mount -li command, eg:

Drive(0): WDC WD40EZRX-00SPEB0
  Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
  ids:
   unix-device: '/dev/sda'
  themed icons: [drive-harddisk-usb] [drive-harddisk] [drive]
  symbolic themed icons: [drive-harddisk-usb-symbolic] [drive-harddisk-symbolic] [drive-symbolic] [drive-harddisk-usb] [drive-harddisk] [drive]
  is_removable=0
  is_media_removable=0
  has_media=1

Unfortunately that variable is set to zero for all my drives, irrespective of whether they are external or are plugged in at reboot, so now I don't see anything appear in the sidebar, not even the SD card. (Actually, I see something appear briefly when I insert the card and then it disappears.)

Upstream, they think that is_removable is just a copy of /sys/block/<device>/removable, and for me that is set to zero for USB and SD devices (but not for CDs). For instance, with kernel 4.6.0-10, for a USB device /dev/sdb:

$ readlink -f /sys/block/sdb/device
/sys/devices/pci0000:00/0000:00:0c.0/usb2/2-1/2-1:1.0/host3/target3:0:0/3:0:0:0

$ cat /sys/block/sdb/removable
0

I wonder if that variable is supposed to represent removable media as opposed to a removable drive?