[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Linux device number bug report
From: |
Shen Feng |
Subject: |
Re: Linux device number bug report |
Date: |
Tue, 13 Jan 2004 11:38:20 +0800 |
Hello,
I think the following code in lib/device.c
60 # ifndef MAJOR
61 # ifndef MINORBITS
62 # define MINORBITS 8
63 # endif /* ! MINORBITS */
64 # define MAJOR(dev) ((unsigned int) ((dev) >> MINORBITS))
65 # endif /* ! MAJOR */
should be changed as following:
60 # ifndef MAJOR
61 # define MAJOR(dev) ((dev >> 8) & 0xfff) | ((unsigned int) (dev >>
32) & ~0xfff)
62 # endif /* ! MAJOR */
The code "((dev >> 8) & 0xfff) | ((unsigned int) (dev >> 32) & ~0xfff)" is from
glibc.
I think this will fix the Linux device number extention bug.
Is it OK?
Regards,
Shen Feng
--------------------------------------------------
Dept. of Technology and Development
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
No. 16-5, Guanzhou Rd., Nanjing, P.R.China
PHONE: +86+25-86630523-633
FUJITSU INTERNAL: 79955-633
FAX: +86+25-83317685
Mail: address@hidden
--------------------------------------------------
----- Original Message -----
From: "Yoshinori K. Okuji" <address@hidden>
To: "Shen Feng" <address@hidden>; <address@hidden>
Sent: Wednesday, December 24, 2003 8:08 PM
Subject: Re: Linux device number bug report
> On Wednesday 24 December 2003 04:55, Shen Feng wrote:
> > In Linux kernel 2.6, device number will be extended from 16-bit to
> > 32-bit. All utilities and libraries should make corresponding
> > extension for this new feature in kernel 2.6.
>
> Exactly.
>
> > I find that “grub-0.93-7” uses variables "major" and "minor" to
> > represent two different parts of device number, but the device number
> > is operated as 16-bit.
>
> I don't know what is grub-0.93-7.
>
> > But this major considers both "major" and "minor" as 8-bit. It seems
> > not to correspond to device number extension.
>
> You are right.
>
> > Since I didn’t find any information about this aspect in homepage of
> > this package, I wonder whether the latest version has completed the
> > device number extension? If not, will it be completed in the future?
> > And when?
>
> The answers are: "No", "I don't know", and "when someone contributes".
> As I don't have Linux 2.6.x, I don't work on it myself. I'd appreciate
> if you could work on it.
>
> Okuji
- Re: Linux device number bug report,
Shen Feng <=