Re: [systemd-devel] udev_device_get_driver implementation

2019-04-24 Thread Sayeed hyder
 ll
/sys/devices/LNXSYSTM:00/device:00/ACPI0012:00/ndbus0/region1/pfn1.1/block/pmem1/
total 0
-r--r--r-- 1 root root 4096 Apr 19 09:38 alignment_offset
-rw-r--r-- 1 root root 4096 Apr 19 09:38 badblocks
lrwxrwxrwx 1 root root0 Apr 19 09:38 bdi ->
../../../../../../../../virtual/bdi/259:3
-r--r--r-- 1 root root 4096 Apr 19 09:38 capability
drwxr-xr-x 2 root root0 Apr 19 09:38 dax
-r--r--r-- 1 root root 4096 Apr 19 09:38 dev
lrwxrwxrwx 1 root root0 Apr 19 09:38 device -> ../../../pfn1.1
-r--r--r-- 1 root root 4096 Apr 19 09:38 discard_alignment
-r--r--r-- 1 root root 4096 Apr 19 09:38 ext_range
drwxr-xr-x 2 root root0 Apr 19 09:38 holders
-r--r--r-- 1 root root 4096 Apr 19 09:38 inflight
drwxr-xr-x 2 root root0 Apr 19 09:38 power
drwxr-xr-x 2 root root0 Apr 19 09:38 queue
-r--r--r-- 1 root root 4096 Apr 19 09:38 range
-r--r--r-- 1 root root 4096 Apr 19 09:38 removable
-r--r--r-- 1 root root 4096 Apr 19 09:38 ro
-r--r--r-- 1 root root 4096 Apr 19 09:38 size
drwxr-xr-x 2 root root0 Apr 19 09:38 slaves
-r--r--r-- 1 root root 4096 Apr 19 09:38 stat
lrwxrwxrwx 1 root root0 Apr 19 09:38 subsystem ->
../../../../../../../../../class/block
drwxr-xr-x 2 root root0 Apr 19 09:38 trace
-rw-r--r-- 1 root root 4096 Apr 19 09:38 uevent


On Wed, Apr 24, 2019 at 11:53 AM Greg KH  wrote:

> On Wed, Apr 24, 2019 at 10:10:08AM -0700, Sayeed hyder wrote:
> > Forgot to hit "reply all"
> >
> > On Wed, Apr 24, 2019 at 9:52 AM Sayeed hyder  wrote:
> >
> > > Hi Greg,
> > >
> > > Sure, this is what I get if I use the syspath from
> > > udev_device_get_syspath. As you can see, it is showing a symlink to a
> > > device, and there is no driver. If it helps, it is a DAX mounted
> persistent
> > > memory device.
> > >
> > > [image: image.png]
>
> Sorry, can't see images from a text email client :(
>
> Anyway, if this is a DAX device, are you _SURE_ you are dealing with a
> real device that is controlled by a driver, and not just a class device?
> Class devices do not have drivers.  How is the DAX device being exposed
> to userspace?
>
> Can you provide a text version of your image?  It's just sysfs, which is
> text...
>
> thanks,
>
> greg k-h
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] udev_device_get_driver implementation

2019-04-24 Thread Sayeed hyder
Forgot to hit "reply all"

On Wed, Apr 24, 2019 at 9:52 AM Sayeed hyder  wrote:

> Hi Greg,
>
> Sure, this is what I get if I use the syspath from
> udev_device_get_syspath. As you can see, it is showing a symlink to a
> device, and there is no driver. If it helps, it is a DAX mounted persistent
> memory device.
>
> [image: image.png]
>
> Thanks,
>
> On Wed, Apr 24, 2019 at 9:38 AM Greg KH 
> wrote:
>
>> On Wed, Apr 24, 2019 at 08:38:02AM -0700, Sayeed hyder wrote:
>> > Hi,
>> >
>> > I was looking at the udev_device_get_driver implementation. It first
>> gets
>> > the sys path and then appends "driver", and calls readlink to get the
>> > driver information. Does it work for all cases? While working on a
>> project,
>> > I found that following the sys path, there is no "driver", but it
>> should be
>> > "device/driver" i.e. if I append "device/driver" instead of "driver"
>> only,
>> > I can use readlink to get the driver information.
>>
>> What in-kernel driver causes an odd sysfs tree like this?  Can you show
>> me the full path of it?
>>
>> thanks,
>>
>> greg k-h
>>
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] udev_device_get_driver implementation

2019-04-24 Thread Sayeed hyder
Hi,

I was looking at the udev_device_get_driver implementation. It first gets
the sys path and then appends "driver", and calls readlink to get the
driver information. Does it work for all cases? While working on a project,
I found that following the sys path, there is no "driver", but it should be
"device/driver" i.e. if I append "device/driver" instead of "driver" only,
I can use readlink to get the driver information.

Can anybody explain whether this was missing in the implementation or am I
missing something?

thanks
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] non-dev systemd-devel package for Linux

2018-08-31 Thread Sayeed hyder
Thanks, I am not confused between udev and devel. Let me explain a bit
more. My understanding is with the devel package, when I include in my
project, I am downloading all the header files and redistributing the code.
With the non-devel runtime package (e.g. libudev1 in Ubuntu), I can avoid
that. Does that clarify my question and confusion?

On Fri, Aug 31, 2018 at 11:17 AM, Vito Caputo  wrote:

> On Fri, Aug 31, 2018 at 07:11:38PM +0100, Simon McVittie wrote:
> > On Fri, 31 Aug 2018 at 10:52:30 -0700, Sayeed hyder wrote:
> > > Thanks Silvio. Unfortunately, I cannot use devel. IIUC, rhel/centos
> does not
> > > provide a non-dev systemd package? That does not sound right.
> >
> > Are you mixing up the concept of an unstable version that is still under
> > development, and the concept of a package containing development headers
> > to be used to compile your own software? They both have the word
> > "development" in, but the thing that is being developed is different.
> >
>
> I think another source of confusion in this situation is "udev"
> containing the word "dev".  I've only been skimming this thread as it
> develops, but it seemed at times Sayeed is conflating the two to all be
> development packages, perhaps not realizing udev is about *devices*.
>
> Regards,
> Vito Caputo
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] non-dev systemd-devel package for Linux

2018-08-31 Thread Sayeed hyder
Thanks Silvio. Unfortunately, I cannot use devel. IIUC, rhel/centos does
not provide a non-dev systemd package? That does not sound right.

On Fri, Aug 31, 2018 at 10:35 AM, Silvio Knizek 
wrote:

> Hi Sayeed,
>
> it is expected that header files are in the -devel packages. You can't
> change this. The package "systemd" contains "udev", so in "systemd-
> devel" are the header files for "udev". "udev" is part of systemd.
> RHLE/CentOS don't split this.
>
> Why can't you just use "systemd-devel"? It just contains everything you
> need to be able to compile against systemd and udev (and maybe more).
>
> BR
> Silvio
>
> Am Freitag, den 31.08.2018, 10:29 -0700 schrieb Sayeed hyder:
> > I tried Mantas's suggestion and try to install "yum install
> > libudev.so.1" which shows me "Package systemd-libs-219-
> > 57.el7_5.1.i686 already installed and latest version". Here is the
> > list of systemd packages already installed in my rhel vm. When I use
> > libudev.h in my program, it cannot compile ("no such file or
> > directory").
> >
> > But if i do "yum install libudev-devel", it installs systemd-
> > devel.x86_64 0:219-57.el7_5.1, and I can compile fine. So, the
> > problem seems to be the difference between package systemd-
> > devel.x86_64 0:219-57.el7_5.1 and package systemd-219-
> > 57.el7_5.1.x86_64. In the latter one, the libudev.h header file is
> > not exposed for use. I cannot use the "devel" version.
> > Any suggestion?
> >
> >
> > thanks,
> > Sayeed
> >
> >
> > On Fri, Aug 31, 2018 at 10:05 AM, Ryan Gonzalez 
> > wrote:
> >
> > > Isn't it just "libudev", e.g. without the 1?
> > >
> > >
> > > On Fri, Aug 31, 2018, 11:19 AM Sayeed hyder 
> > > wrote:
> > >
> > > > Thanks Reindl. Let me be a bit more specific. I am looking for
> > > > the
> > > > non-dev package. For example, for ubuntu and sles, I can do the
> > > > followiing
> > > >
> > > > apt-get install libudev1 works
> > > > zypper install libudev1 works
> > > >
> > > > But, for rhel,
> > > > yum install libudev1    cannot find package
> > > > yum install libudev-devel works
> > > >
> > > > Is there any runtime (non-dev) package for rhel/centos distro? If
> > > > so,
> > > > what is the package name I should look for?
> > > >
> > > >
> > > > thanks,
> > > > Sayeed
> > > >
> > > >
> > > > On Fri, Aug 31, 2018 at 8:24 AM, Reindl Harald <
> > > > h.rei...@thelounge.net>
> > > > wrote:
> > > >
> > > > >
> > > > >
> > > > > Am 31.08.18 um 16:51 schrieb Sayeed hyder:
> > > > > > Where can I get the link of available non-dev packages for
> > > > > > different
> > > > > > Linux distros? I am specifically looking for rhel version  of
> > > > > > libudev
> > > > > > package.
> > > > >
> > > > > from the package repo of teh distribution?
> > > > > just download the CentOS one which is identical to RHEL
> > > > > ___
> > > > > systemd-devel mailing list
> > > > > systemd-devel@lists.freedesktop.org
> > > > > https://lists.freedesktop.org/mailman/listinfo/systemd-devel
> > > > >
> > > >
> > > > ___
> > > > systemd-devel mailing list
> > > > systemd-devel@lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/systemd-devel
> > > >
> > >
> > > --
> > >
> > > Ryan (ライアン)
> > > Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone
> > > else
> > > https://refi64.com/
> > >
> >
> > ___
> > systemd-devel mailing list
> > systemd-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] non-dev systemd-devel package for Linux

2018-08-31 Thread Sayeed hyder
I tried Mantas's suggestion and try to install "yum install libudev.so.1"
which shows me "Package systemd-libs-219-57.el7_5.1.i686 already installed
and latest version". Here is the list of systemd packages already installed
in my rhel vm. When I use libudev.h in my program, it cannot compile ("no
such file or directory").

But if i do "yum install libudev-devel", it installs systemd-devel.x86_64
0:219-57.el7_5.1, and I can compile fine. So, the problem seems to be the
difference between package systemd-devel.x86_64 0:219-57.el7_5.1 and
package systemd-219-57.el7_5.1.x86_64. In the latter one, the libudev.h
header file is not exposed for use. I cannot use the "devel" version. Any
suggestion?


thanks,
Sayeed


On Fri, Aug 31, 2018 at 10:05 AM, Ryan Gonzalez  wrote:

> Isn't it just "libudev", e.g. without the 1?
>
>
> On Fri, Aug 31, 2018, 11:19 AM Sayeed hyder  wrote:
>
>> Thanks Reindl. Let me be a bit more specific. I am looking for the
>> non-dev package. For example, for ubuntu and sles, I can do the followiing
>>
>> apt-get install libudev1 works
>> zypper install libudev1 works
>>
>> But, for rhel,
>> yum install libudev1    cannot find package
>> yum install libudev-devel works
>>
>> Is there any runtime (non-dev) package for rhel/centos distro? If so,
>> what is the package name I should look for?
>>
>>
>> thanks,
>> Sayeed
>>
>>
>> On Fri, Aug 31, 2018 at 8:24 AM, Reindl Harald 
>> wrote:
>>
>>>
>>>
>>> Am 31.08.18 um 16:51 schrieb Sayeed hyder:
>>> > Where can I get the link of available non-dev packages for different
>>> > Linux distros? I am specifically looking for rhel version  of libudev
>>> > package.
>>> from the package repo of teh distribution?
>>> just download the CentOS one which is identical to RHEL
>>> ___
>>> systemd-devel mailing list
>>> systemd-devel@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>>
>>
>> ___
>> systemd-devel mailing list
>> systemd-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>>
> --
>
> Ryan (ライアン)
> Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else
> https://refi64.com/
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] non-dev systemd-devel package for Linux

2018-08-31 Thread Sayeed hyder
Thanks Reindl. Let me be a bit more specific. I am looking for the non-dev
package. For example, for ubuntu and sles, I can do the followiing

apt-get install libudev1 works
zypper install libudev1 works

But, for rhel,
yum install libudev1    cannot find package
yum install libudev-devel works

Is there any runtime (non-dev) package for rhel/centos distro? If so, what
is the package name I should look for?


thanks,
Sayeed


On Fri, Aug 31, 2018 at 8:24 AM, Reindl Harald 
wrote:

>
>
> Am 31.08.18 um 16:51 schrieb Sayeed hyder:
> > Where can I get the link of available non-dev packages for different
> > Linux distros? I am specifically looking for rhel version  of libudev
> > package.
> from the package repo of teh distribution?
> just download the CentOS one which is identical to RHEL
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] non-dev systemd-devel package for Linux

2018-08-31 Thread Sayeed hyder
Hi,

Where can I get the link of available non-dev packages for different Linux
distros? I am specifically looking for rhel version  of libudev package.


thanks,
Sayeed
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel