:: Re: [DNG] USB mount problem
Top Pagina
Delete this message
Reply to this message
Auteur: Didier Kryn
Datum:  
Aan: dng@lists.dyne.org
Onderwerp: Re: [DNG] USB mount problem
Le 12/06/2021 à 20:59, aitor a écrit :
>
> Hi Didier,
>
> On 12/6/21 19:42, Didier Kryn wrote:
>>     Hello.
>>
>>     My aproach with Hopman was to be totally independant of the
>> hotplugger (udev/eudev/vdev/mdev, even systemd) provided it does the
>> job, which is to create the device special file in /dev (which the
>> kernel can do on its own). Then, if the hotplugger is capable to create
>> a symlink in /dev/disk/by-label, then Hopman uses it to display the disk
>> label and eventually passes it to the mount helper.
> And this is the problem i was having with vdev. The capability to
> create symlinks in /dev/disk in the right way (maybe my fault),
> and this is the reason whyi was using blkid to get the disk label.
>> Hopman is a single-threaded program;
> I'm used to using a worker thread to make it update the gui without
> crashing. Although, I've been using your single-threaded version
> for a long time and it works fine, doing the job.
>> its only dependencies are the presence of a
>> kernel with the inotify and signalfd APIs, which is the case since more
>> than a decade, unless disabled during kernel build, which would be evil.
>
> "Moreover, the approach of libudev-compat is generic enough to not
> specific to a particular kernel or device manager" -Jude Nelson.
>
> Btw, i'm splitting the content of the vdev project in vdevd and the
> helpers on the one hand, and libudev-compat on the other,increasing
> the version of libudev-compat in the same rate as libeudev for the
> sake of a less painful packaging maintainence:
>
> https://gitea.devuan.dev/aitor_czr/libudev-compat
> <https://gitea.devuan.dev/aitor_czr/libudev-compat>
>
> What do you think about this?
>
> @Didier: if you are interested in how libudev-compat works, give
> special attention to libudev-monitor.c and libudev-fs.c
>

    Hi AItor.

    I was never able to understand the ABI of libudev, due to the
absence of a manual. I have a great admiration for Jude and you to have
understood it. I will have a look at libudev-monitor.c . Nevertheless,
and whatever the method used (netlink for libudev or files for
libudev-compat), it relies on the hotplugger to populate its database. I
don't think this makes a big difference, except that udev make things
more confuse by using the same netlink as the kernel to talk to libudev.

    It seems to me that, with libudev-compat you could have Vdevd create
the symlinks, so that your problem would be solved. Do I understand
well? This seems to me completely independant of Hopman which is desirable.

    Cheers.

--     Didier