* Bdale Garbee schrieb am 12.08.04, um 23:22 Uhr:
> Someone want to offer me a patch that implements this? It's not hard, bu=
t I'm
> working on other things today and it'll get done faster if someone hands =
me a
> patch.
>=20
> There's already code in the consoleonly target to do kernel version check=
ing.
Ah, this was the part where i did not know how to realize this check,
thanks for the hint. :)
Well, i created a patch for this bug now, but i am not completely sure
about the check of the $kern_rev3, because it will also output just 8
on kernels like 2.6.8-pre2 (where char-major 250 was used).
The second thing where i am not sure is if it is needed to check for
devfs before calling makedev, and if the ckeck in my patch is right.
Message-ID: <20040812222023 .GA18474@ slipstream>
Date: Fri, 13 Aug 2004 00:20:23 +0200
From: Thomas Schmidt <email address hidden>
To: Bdale Garbee <email address hidden>
Cc: Adrian Bunk <email address hidden>, <email address hidden>, <email address hidden>
Subject: Re: Bug#263136: This issue might break applications
--mxv5cy4qt+RJ9ypb "wRRV7LY7NUeQGE oC" Disposition: inline
Content-Type: multipart/mixed; boundary=
Content-
--wRRV7LY7NUeQGEoC Disposition: inline Transfer- Encoding: quoted-printable
Content-Type: text/plain; charset=us-ascii
Content-
Content-
* Bdale Garbee schrieb am 12.08.04, um 23:22 Uhr:
> Someone want to offer me a patch that implements this? It's not hard, bu=
t I'm
> working on other things today and it'll get done faster if someone hands =
me a
> patch.
>=20
> There's already code in the consoleonly target to do kernel version check=
ing.
Ah, this was the part where i did not know how to realize this check,
thanks for the hint. :)
Well, i created a patch for this bug now, but i am not completely sure
about the check of the $kern_rev3, because it will also output just 8
on kernels like 2.6.8-pre2 (where char-major 250 was used).
The second thing where i am not sure is if it is needed to check for
devfs before calling makedev, and if the ckeck in my patch is right.
See the attached file.
Thomas
--=20
Thomas Schmidt
<email address hidden>
--wRRV7LY7NUeQGEoC Disposition: attachment; filename= "263136. diff" Transfer- Encoding: quoted-printable
Content-Type: text/plain; charset=us-ascii
Content-
Content-
diff -Nurd makedev- 2.3.1/debian/ init.d makedev- 2.3.1.new/ debian/ init.d 2.3.1/debian/ init.d 2004-08-13 00:08:20.000000000 +0200 2.3.1.new/ debian/ init.d 2004-08-13 00:10:38.000000000 +0200 reload| restart| force-reload) 2.3.1/MAKEDEV makedev- 2.3.1.new/ MAKEDEV 2.3.1/MAKEDEV 2004-08-13 00:08:20.000000000 +0200 2.3.1.new/ MAKEDEV 2004-08-13 00:09:44.000000000 +0200 ^.]*\)\ ..*@\1@ '` ]*\.\([ ^.]*\)\ ..*@\1@ '` ]*\.[^. ]*\.\([ ^.][0-9] *\).*@\ 1@'` i/video0 c 250 `math 64 \* $i + 0` $video i/audio0 c 250 `math 64 \* $i + 1` $video i/frontend0 c 250 `math 64 \* $i + 3` $video i/demux0 c 250 `math 64 \* $i + 4` $video i/video0 c $dvb_major `math 64 \* $i + 0` $video i/audio0 c $dvb_major `math 64 \* $i + 1` $video i/frontend0 c $dvb_major `math 64 \* $i + 3` $video i/demux0 c $dvb_major `math 64 \* $i + 4` $video
--- makedev-
+++ makedev-
@@ -8,6 +8,20 @@
case "$1" in
start)
test -L /dev/MAKEDEV || ln -fs /sbin/MAKEDEV /dev/MAKEDEV
+
+ # create dvb-devices, if the dvb-directory allready exists, and=20
+ # no devfs is used (this a workaround for the changed major-number
+ # of the dvb-devices, introduced in kernel 2.6.8, to be able to=20
+ # switch between kernels <=3D 2.6.7 and >=3D 2.6.8, without manual=20
+ # recreation of the devices (MAKEDEV dvb checks the kernel-version=20
+ # and uses the correct major-number))
+=09
+ if [ ! -e /dev/.devfsd ]; then
+ if [ -d /dev/dvb ]; then
+ cd /dev && ./MAKEDEV dvb
+ fi
+ fi
+=09
;;
stop|
;;
diff -Nurd makedev-
--- makedev-
+++ makedev-
@@ -1974,18 +1974,32 @@
done
;;
dvb)
+ # check if kernel-version is >=3D 2.6.8, if yes, create dvb-devices with
+ # major-number 212, in the other case 250
+ =09
+ kern_rev1=3D`uname -r | sed -e 's@^\([
+ kern_rev2=3D`uname -r | sed -e 's@^[^.
+ kern_rev3=3D`uname -r | sed -e 's@^[^.
+ =20
+ dvb_major=3D250
+
+ if [ $kern_rev1 -ge 2 ] && [ $kern_rev2 -ge 6 ] && [ $kern_rev3 -ge 8 ]
+ then
+ dvb_major=3D212
+ fi
+
mkdir -p dvb
for i in 0 1 2 3
do
mkdir -p dvb/adapter$i
- makedev dvb/adapter$
- makedev dvb/adapter$
- makedev dvb/adapter$
- makedev dvb/adapter$
- makedev dvb/adapter$i/dvr0 c 250 `math 64 \* $i + 5` $video
- makedev dvb/adapter$i/ca0 c 250 `math 64 \* $i + 6` $video
- makedev dvb/adapter$i/net0 c 250 `math 64 \* $i + 7` $video
- makedev dvb/adapter$i/osd0 c 250 `math 64 \* $i + 8` $video
+ makedev dvb/adapter$
+ makedev dvb/adapter$
+ makedev dvb/adapter$
+ makedev dvb/adapter$
+ makedev dvb/adapter$i/dvr0 c $dvb_major `math 64 \* $i + 5` $video
+ makedev dvb/adapter$i/ca0 c $dvb_major `math 64 \* $i + 6` $video
+ makedev dvb/adapter$i/net0 c $dvb_major `math 64 \* $i + 7` $video
+ makedev dvb/adapter$i/osd0 c $dvb_major `math 64 \* $i + 8` $video
done
;;
usb)
--wRRV7LY7NUeQG EoC--
--mxv5cy4qt+RJ9ypb pgp-signature; name="signature .asc" Description: Digital signature Disposition: inline
Content-Type: application/
Content-
Content-
-----BEGIN PGP SIGNATURE-----
0nc9+NqwoydlIRA vnlAKDHmKn/ EXurQzIekLxaqpW gAMzDDQCgrjfl 8gNQmIJj7M=
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBG+
JzXQVsqFUYtL/
=+HLe
-----END PGP SIGNATURE-----
--mxv5cy4qt+ RJ9ypb- -