Mailinglist Archive: opensuse-factory (1264 mails)

< Previous Next >
Re: [opensuse-factory] Device names in openSUSE
On Wed, Sep 14, 2011 at 1:33 PM, Greg KH <gregkh@xxxxxxx> wrote:
On Wed, Sep 14, 2011 at 05:40:01PM +0200, Anders Johansson wrote:
On Wednesday 14 September 2011 10:53:42 Greg KH wrote:
If you want to determine if this really is a USB device or not, then you
need to look elsewhere in the system, not in /dev.

Out of interest, what is the correct way to determine if a particular device
is removable, with hal gone? Is it the DeviceIsRemovable property in
DeviceKit/udisk?

Yes, I think it is.

Are you avoiding /sys for some reason?

If not, I vote for it being "cat /sys/block/sda/removable".

And since /sys is part of the Linux ABI it should be a stable interface.

The bigger question is if the data found there is reliable. I don't
know. I do know some of the sysfs fields associated with the disks
are not reliable (but the existence of the files are stable!).

Greg
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups