* [PATCH] udev-watch: try inotify_init if inotify_init1 is not available
@ 2011-02-25 15:55 Steffen Sledz
2011-02-25 16:57 ` Kay Sievers
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Steffen Sledz @ 2011-02-25 15:55 UTC (permalink / raw)
To: linux-hotplug
inotify_init1 first appeared in Linux 2.6.27
Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
udev/udev-watch.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/udev/udev-watch.c b/udev/udev-watch.c
index f51a10d..ac679ec 100644
--- a/udev/udev-watch.c
+++ b/udev/udev-watch.c
@@ -39,6 +39,8 @@ static int inotify_fd = -1;
int udev_watch_init(struct udev *udev)
{
inotify_fd = inotify_init1(IN_CLOEXEC);
+ if (inotify_fd = -1 && errno = ENOSYS)
+ inotify_fd = inotify_init();
if (inotify_fd < 0)
err(udev, "inotify_init failed: %m\n");
return inotify_fd;
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] udev-watch: try inotify_init if inotify_init1 is not available
2011-02-25 15:55 [PATCH] udev-watch: try inotify_init if inotify_init1 is not available Steffen Sledz
@ 2011-02-25 16:57 ` Kay Sievers
2011-02-25 17:01 ` [PATCH] udev-watch: try inotify_init if inotify_init1 is not Steffen Sledz
2011-02-25 17:46 ` [PATCH] udev-watch: try inotify_init if inotify_init1 is not available Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2011-02-25 16:57 UTC (permalink / raw)
To: linux-hotplug
On Fri, Feb 25, 2011 at 16:55, Steffen Sledz <sledz@dresearch.de> wrote:
> inotify_init1 first appeared in Linux 2.6.27
We depend on that or a more recent kernel for a few other reasons too.
.27 might be the first on where this udev version compiles, but all
below .32 is pretty much untested and known to fail during runtime in
some areas. Let's not fix such compile failures, it is unlikely that
udev will run properly for other reasons than inotify.
Thanks,
Kay
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] udev-watch: try inotify_init if inotify_init1 is not
2011-02-25 15:55 [PATCH] udev-watch: try inotify_init if inotify_init1 is not available Steffen Sledz
2011-02-25 16:57 ` Kay Sievers
@ 2011-02-25 17:01 ` Steffen Sledz
2011-02-25 17:46 ` [PATCH] udev-watch: try inotify_init if inotify_init1 is not available Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Steffen Sledz @ 2011-02-25 17:01 UTC (permalink / raw)
To: linux-hotplug
Am 25.02.2011 17:57, schrieb Kay Sievers:
> On Fri, Feb 25, 2011 at 16:55, Steffen Sledz <sledz@dresearch.de> wrote:
>> inotify_init1 first appeared in Linux 2.6.27
>
> We depend on that or a more recent kernel for a few other reasons too.
> .27 might be the first on where this udev version compiles, but all
> below .32 is pretty much untested and known to fail during runtime in
> some areas. Let's not fix such compile failures, it is unlikely that
> udev will run properly for other reasons than inotify.
Hmmm?
Is there an overview of these reasons? We like/need to use udev-151 (or newer) together with linux 2.6.24.
Steffen
--
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:sledz@DResearch.de
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] udev-watch: try inotify_init if inotify_init1 is not available
2011-02-25 15:55 [PATCH] udev-watch: try inotify_init if inotify_init1 is not available Steffen Sledz
2011-02-25 16:57 ` Kay Sievers
2011-02-25 17:01 ` [PATCH] udev-watch: try inotify_init if inotify_init1 is not Steffen Sledz
@ 2011-02-25 17:46 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2011-02-25 17:46 UTC (permalink / raw)
To: linux-hotplug
On Fri, Feb 25, 2011 at 18:01, Steffen Sledz <sledz@dresearch.de> wrote:
> Am 25.02.2011 17:57, schrieb Kay Sievers:
>> On Fri, Feb 25, 2011 at 16:55, Steffen Sledz <sledz@dresearch.de> wrote:
>>> inotify_init1 first appeared in Linux 2.6.27
>>
>> We depend on that or a more recent kernel for a few other reasons too.
>> .27 might be the first on where this udev version compiles, but all
>> below .32 is pretty much untested and known to fail during runtime in
>> some areas. Let's not fix such compile failures, it is unlikely that
>> udev will run properly for other reasons than inotify.
>
> Hmmm?
>
> Is there an overview of these reasons? We like/need to use udev-151 (or newer) together with linux 2.6.24.
Not really. It's all a moving target in one direction only. We only
really support compatibility for newer kernels with old userspace. Old
kernels with new userspace are usually not even tested.
Support for kernels with the deprecated sysfs layout
(CONFIG_SYSFS_DEPRECATED) has been removed a while ago.
Some lookup/enumeration features in libudev relies on information in
/sys only available in kernels >= .31.
Some stuff relies on DEVNAME set by the kernel, which was part of the
devtmpfs changes. Udev should run fine on plain tmpfs, but it is also
not tested anymore. Also races that happen only with tmpfs don't get
fixed anymore.
Some changes are visible in the compat rules files:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=rules/misc/30-kernel-compat.rules;hb=HEAD
The same rules applie here, we already dropped stuff here for kernels
older than .27.
Kay
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-25 17:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 15:55 [PATCH] udev-watch: try inotify_init if inotify_init1 is not available Steffen Sledz
2011-02-25 16:57 ` Kay Sievers
2011-02-25 17:01 ` [PATCH] udev-watch: try inotify_init if inotify_init1 is not Steffen Sledz
2011-02-25 17:46 ` [PATCH] udev-watch: try inotify_init if inotify_init1 is not available Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).