bugfindutils - Bugs: bug #7266, Linux device number bug report

 
 

bug #7266: Linux device number bug report

Submitter:  None
Submitted:  Thu 15 Jan 2004 09:13:44 AM UTC
   
 
Category:  find Severity:  2 - Minor
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  jay
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  None
Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 21 Nov 2004 04:59:43 PM UTC, comment #2: 

The findutils code uses the header file sysmacros.h, which is provided by the system.  This defines the macros major() and minor().  If those produce 32-bit values, "listfile.c" will cope with them (as unsigned longs).     The macro definitions for major and minor are only used when the system doesn't define these - as the code snipped you provided actually shows.  Hence I see no problem here.

James Youngman <jay>
Group administrator
Mon 03 May 2004 10:02:55 AM UTC, comment #1: 

Looking at linux/kdev_t.h, the device numbers exposed to the
user level still seems to use 8-bit major and minor numbers. 
The filesystem level uses larger sizes, but the userland interface does not.  Hence I can't test your proposed extension.

James Youngman <jay>
Group administrator
Thu 15 Jan 2004 09:13:44 AM UTC, original submission:  


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 “findutils-4.1.7” uses structure dev_t and operates the device number as 16-bit.
------------------------------------------------------------------------------------------
1. lib/listfile.c line 160:

#ifdef major   /* Might be defined in sys/types.h.  */
#define HAVE_MAJOR
#endif
#ifndef HAVE_MAJOR
#define major(dev)  (((dev) >> 8) & 0xff)
#define minor(dev)  ((dev) & 0xff)
#endif

This is a backup for lost of system defined macro major and minor, but all of these operations
look dev_t as 16 bits instead of 32 bits, so they will call problem when actually use them.
------------------------------------------------------------------------------------------

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.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-11-21 jay StatusNone Invalid
    Assigned toNone jay
    Open/ClosedOpen Closed
2004-05-03 jay CategoryNone find
    Severity3 - Normal 2 - Minor

Back to the top

Powered by Savane 3.13-02a9.
Corresponding source code