Skip to contentSkip to conversation

Minor numbers

DISCUSSION [email protected] 1 participant 1 message May 14, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines

Im very interested in 32bit dev_t or at least implementing the 'lots of majors' half of it because we are probably going to need it in the 2.5 years before we have a 2.6

Yes, a larger dev_t has been desirable for a long time, and more and more kludges are invented to work around its lack. Still, changing this is fairly simple.

I firmly believe that we want to go to 64-bit. In case there is an intermediate step, that means that it would have to be 16+16, in order not to introduce complications later.

Quoted 4 lines
Quoted 2 lines

The system call itself cannot easily be changed to take a larger dev_t, mostly because under old glibc the high order part would be random.

Is that true or is it always happening to be clear ?

I wrote that talking about 64-bit dev_t. For 32-bit one might be slightly more optimistic. The C calling conventions will widen a short to an int, I suppose.
It is true however that older glibc does its best to make sure the kernel doesnt see more than 16 bits:

int

  __xmknod (int vers, const char *path, mode_t mode, dev_t *dev) {
	unsigned short int k_dev;
	k_dev = ((major (*dev) & 0xff) << 8) | (minor (*dev) & 0xff);
	return __syscall_mknod (path, mode, k_dev);

}

Andries