[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Linux device number bug report
From: |
WEI Yongjun |
Subject: |
Linux device number bug report |
Date: |
Wed, 14 Jan 2004 15:25:05 +0800 |
Hello,
I have some questions about device number extension.
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.
I find that "glibc-kernheaders-2.4-8.34" uses structure dev_t and operates
the device number as 16-bit.
1. In file usr/include/linux/kdev_t.h : 110
#define MAJOR(dev) ((dev)>>8)
#define MINOR(dev) ((dev) & 0xff)
#define MKDEV(ma,mi) ((ma)<<8 | (mi))
This operation(MKDEV) wants to combine major and minor to a device number.
In old definition, a device number is MMMMMMMMnnnnnnnn(M is major part and n
is minor part). This operation actually gets right device number.
But new device number is nnnnnnnnnnnnMMMMMMMMMMMMnnnnnnnn. So this operation
will lost high 12-bit minor number.
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?
Looking forward to answering.
--------------------------------------------------
Wei Yongjun
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-6630523-633
FUJITSU INTERNAL: 79955-651
FAX: +86+25-3317685
Mail: address@hidden
--------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Linux device number bug report,
WEI Yongjun <=