- 16bit->32bit dev major/minor numbers

This commit is contained in:
kzak 2005-09-21 10:36:10 +00:00
parent e70de0ef40
commit cf67eaf6b6
2 changed files with 32 additions and 7 deletions

20
lockdev-1.0.1-32bit.patch Normal file
View File

@ -0,0 +1,20 @@
--- lockdev-1.0.1/src/lockdev.c.32bit 2005-09-21 11:23:36.000000000 +0200
+++ lockdev-1.0.1/src/lockdev.c 2005-09-21 11:55:22.000000000 +0200
@@ -228,13 +228,13 @@
_debug( 3, "_dl_filename_1 (stat=%d)\n", (int)st->st_rdev);
#if defined (__linux__)
/* this changes the major from 5 to 4 if it was a cua device */
- if ( (int)st->st_rdev >= (TTYAUX_MAJOR*256)+64
- && (int)st->st_rdev <= (TTYAUX_MAJOR*256)+127 )
- add = (TTY_MAJOR - TTYAUX_MAJOR)*256;
+ if ( (int)st->st_rdev >= makedev(TTYAUX_MAJOR,64)
+ && (int)st->st_rdev <= makedev(TTYAUX_MAJOR,127))
+ add = makedev((TTY_MAJOR - TTYAUX_MAJOR),0);
#endif /* __linux__ */
/* lockfile of type /var/lock/LCK.004.064 */
l = sprintf( name, "%s/LCK.%03d.%03d", LOCK_PATH,
- (int)MAJOR( add+st->st_rdev), (int)MINOR( add+st->st_rdev));
+ (int)major(add+st->st_rdev), (int)minor(add+st->st_rdev));
_debug( 2, "_dl_filename_1 () -> len=%d, name=%s<\n", l, name);
return l;
}

View File

@ -1,7 +1,7 @@
Summary: A library for locking devices.
Name: lockdev
Version: 1.0.1
Release: 8
Release: 9
License: LGPL
Group: System Environment/Libraries
Source: http://ftp.debian.org/debian/pool/main/l/lockdev/%{name}_%{version}.orig.tar.gz
@ -13,6 +13,7 @@ Patch4: lockdev-1.0.1-checkname.patch
Patch5: lockdev-1.0.1-pidexists.patch
Patch6: lockdev-1.0.1-subdir.patch
Patch7: lockdev-1.0.1-fcntl.patch
Patch8: lockdev-1.0.1-32bit.patch
Prereq: shadow-utils, filesystem >= 2.1.4-1
BuildRoot: %{_tmppath}/%{name}-root
@ -40,6 +41,7 @@ package contains the development headers and a static library.
%patch5 -p1 -b .pidexists
%patch6 -p1 -b .subdir
%patch7 -p1 -b .fcntl
%patch8 -p1 -b .32bit
%build
make "CFLAGS=${RPM_OPT_FLAGS} -fPIC"
@ -79,6 +81,9 @@ rm -fr $RPM_BUILD_ROOT
%{_includedir}/*
%changelog
* Wed Sep 21 2005 Karel Zak <kzak@redhat.com> 1.0.1-9
- fix #165189 - The naming of the lock file by the lockdev command is abnormal.
* Thu Sep 1 2005 Karel Zak <kzak@redhat.com> 1.0.1-8
- fix #163276 - baudboy.h should include fcntl.h
@ -142,10 +147,10 @@ rm -fr $RPM_BUILD_ROOT
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Thu Nov 29 2001 Trond Eivind Glomsrød <teg@redhat.com> 1.0.0-16
* Thu Nov 29 2001 Trond Eivind Glomsrod <teg@redhat.com> 1.0.0-16
- Rebuilt
* Fri Oct 26 2001 Trond Eivind Glomsrød <teg@redhat.com> 1.0.0-15
* Fri Oct 26 2001 Trond Eivind Glomsrod <teg@redhat.com> 1.0.0-15
- Add copyright/license info to baudboy.h (#54321)
* Tue Sep 4 2001 Jeff Johnson <jbj@redhat.com>
@ -170,10 +175,10 @@ rm -fr $RPM_BUILD_ROOT
* Sun Aug 5 2001 Jeff Johnson <jbj@redhat.com>
- include setgid helper binary and baudboy.h.
* Mon Jun 18 2001 Trond Eivind Glomsrød <teg@redhat.com>
* Mon Jun 18 2001 Trond Eivind Glomsrod <teg@redhat.com>
- Make the -devel depend on the main package
* Sun Aug 06 2000 Trond Eivind Glomsrød <teg@redhat.com>
* Sun Aug 06 2000 Trond Eivind Glomsrod <teg@redhat.com>
- rebuild
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
@ -182,8 +187,8 @@ rm -fr $RPM_BUILD_ROOT
* Sat Jun 17 2000 Bill Nottingham <notting@redhat.com>
- add %%defattr for -devel
* Sat Jun 10 2000 Trond Eivind Glomsrød <teg@redhat.com>
* Sat Jun 10 2000 Trond Eivind Glomsrod <teg@redhat.com>
- use %%{_mandir}
* Thu May 04 2000 Trond Eivind Glomsrød <teg@redhat.com>
* Thu May 04 2000 Trond Eivind Glomsrod <teg@redhat.com>
- first build