Re: [systemd-devel] udevd detect and list ata devices

2015-12-07 Thread poma
On Sun, Dec 6, 2015 at 7:09 PM, Marek wrote: > why not use cleints such as google mail instead of daringfireball.net? > ... This is via Gmail - web-based email service - "client". Bottom-posting: Reply to all -> [...] "Show trimmed content" -> 2 x Del -> Ctrl + End Ain't hard? _

Re: [systemd-devel] udevd detect and list ata devices

2015-12-06 Thread Robert Milasan
On Sun, 6 Dec 2015 17:46:09 +0100 "Marek" wrote: > thanks Robert, eample2 does list all disks but doens't differentiate > between ata and usb. You could add a little hack like this in the udev_example2.c code: if (strstr(udev_device_get_syspath(dev), "/ata") != NULL) { } -- R

Re: [systemd-devel] udevd detect and list ata devices

2015-12-06 Thread Steve Abner
On 12/06/2015 11:46 AM, Marek wrote: thanks Robert, eample2 does list all disks but doens't differentiate between ata and usb. On Sun, Dec 6, 2015 at 10:49 AM, Robert Milasan wrote: On Sun, 6 Dec 2015 01:49:41 +0100 "Marek" wrote: udev_device_get_sysname(block) /sys/devices/pci:00/

Re: [systemd-devel] udevd detect and list ata devices

2015-12-06 Thread Marek
why not use cleints such as google mail instead of daringfireball.net? On Sun, Dec 6, 2015 at 5:59 PM, Greg KH wrote: > A: No. > Q: Should I include quotations after my reply? > > http://daringfireball.net/2007/07/on_top > > On Sun, Dec 06, 2015 at 05:51:11PM +0100, Marek wrote: >> those too :) b

Re: [systemd-devel] udevd detect and list ata devices

2015-12-06 Thread Greg KH
A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Sun, Dec 06, 2015 at 05:51:11PM +0100, Marek wrote: > those too :) but it's a rare situation. Programs are all about having to handle the "rare" situations properly. And you didn't say _why_ you ca

Re: [systemd-devel] udevd detect and list ata devices

2015-12-06 Thread Marek
those too :) but it's a rare situation. On Sun, Dec 6, 2015 at 5:48 PM, Greg KH wrote: > On Sun, Dec 06, 2015 at 05:38:37PM +0100, Marek wrote: >> i'm trying to get only ata devices because my application requires i >> only list disks that are sata drives inside the computer. > > Why would an app

Re: [systemd-devel] udevd detect and list ata devices

2015-12-06 Thread Greg KH
On Sun, Dec 06, 2015 at 05:38:37PM +0100, Marek wrote: > i'm trying to get only ata devices because my application requires i > only list disks that are sata drives inside the computer. Why would an application care about the type of a drive inside of a computer? What about sata drives outside of

Re: [systemd-devel] udevd detect and list ata devices

2015-12-06 Thread Marek
thanks Robert, eample2 does list all disks but doens't differentiate between ata and usb. On Sun, Dec 6, 2015 at 10:49 AM, Robert Milasan wrote: > On Sun, 6 Dec 2015 01:49:41 +0100 > "Marek" wrote: > >> >> udev_device_get_sysname(block) >> /sys/devices/pci:00/:00:11.0/ata1/host0/target0:

Re: [systemd-devel] udevd detect and list ata devices

2015-12-06 Thread Marek
i'm trying to get only ata devices because my application requires i only list disks that are sata drives inside the computer. On Sun, Dec 6, 2015 at 2:37 AM, Greg KH wrote: > On Sun, Dec 06, 2015 at 01:49:41AM +0100, Marek wrote: >> > >> /sys/ >> > And "ata" devices are not the same thing as a "

Re: [systemd-devel] udevd detect and list ata devices

2015-12-06 Thread Robert Milasan
On Sun, 6 Dec 2015 01:49:41 +0100 "Marek" wrote: > > udev_device_get_sysname(block) > /sys/devices/pci:00/:00:11.0/ata1/host0/target0:0:0/0:0:0:0/block/sda > /sys/devices/pci:00/:00:12.2/usb1/1-1/1-1:1.0/host8/target8:0:0/8:0:0:0/block/sdg Try this examples: https://github.com/r

Re: [systemd-devel] udevd detect and list ata devices

2015-12-05 Thread Greg KH
On Sun, Dec 06, 2015 at 01:49:41AM +0100, Marek wrote: > > > /sys/ > > And "ata" devices are not the same thing as a "usb" device is in any way > > or form, so the fact that they have to be shown differently is totally > > natural. You can iterate over them, you just have to find the correct > > c

Re: [systemd-devel] udevd detect and list ata devices

2015-12-05 Thread Marek
> /sys/ > And "ata" devices are not the same thing as a "usb" device is in any way > or form, so the fact that they have to be shown differently is totally > natural. You can iterate over them, you just have to find the correct > class that the kernel uses for them ("ata_device"), but there is no

Re: [systemd-devel] udevd detect and list ata devices

2015-11-21 Thread Greg KH
On Sat, Nov 21, 2015 at 02:54:21AM +0100, Marek wrote: > Im trying to list ata devices in the same manner i am able to list usb > devices. That's not an answer to the "what problem are you trying to solve" :) And "ata" devices are not the same thing as a "usb" device is in any way or form, so th

Re: [systemd-devel] udevd detect and list ata devices

2015-11-20 Thread Marek
Im trying to list ata devices in the same manner i am able to list usb devices. On Fri, Nov 20, 2015 at 11:00 PM, Greg KH wrote: > On Fri, Nov 20, 2015 at 08:59:21PM +0100, Marek wrote: >> hi, >> >> i'm using the following code: >> http://stackoverflow.com/questions/25361042/how-to-list-usb-mass-

Re: [systemd-devel] udevd detect and list ata devices

2015-11-20 Thread Greg KH
On Fri, Nov 20, 2015 at 08:59:21PM +0100, Marek wrote: > hi, > > i'm using the following code: > http://stackoverflow.com/questions/25361042/how-to-list-usb-mass-storage-devices-programatically-using-libudev-in-linux?lq=1 > the problem is with this section of code: > struct udev_device* usb >

[systemd-devel] udevd detect and list ata devices

2015-11-20 Thread Marek
hi, i'm using the following code: http://stackoverflow.com/questions/25361042/how-to-list-usb-mass-storage-devices-programatically-using-libudev-in-linux?lq=1 the problem is with this section of code: struct udev_device* usb = udev_device_get_parent_with_subsystem_devtype(scsi, "usb", "