Skip to contentSkip to conversation

--resend-- Major 254 to Major 250

PATCH In review Darryl Dixon 3 participants 5 messages Feb 11, 2005 – Feb 12, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 --resend-- Major 254 to Major 250

Email formatting mashed the previous patch I sent in, so please find attached a new copy which works around the 'could not major 254' error by moving the kqemu device to major 250.

Cheers,

Signature · 1 line
Darryl Dixon <[email protected]>
kqemu/install.sh +1 -1
diff -ru qemu/kqemu/install.sh qemu_major250/kqemu/install.sh
@@ -20,5 +20,5 @@
 # Create the kqemu device. No special priviledge is needed to use kqemu.
 device="/dev/kqemu"
 rm -f $device
-mknod $device c 254 0
+mknod $device c 250 0
 chmod 666 $device
kqemu/kqemu.h +1 -1
diff -ru qemu/kqemu/kqemu.h qemu_major250/kqemu/kqemu.h
@@ -1,7 +1,7 @@
 #ifndef KQEMU_H
 #define KQEMU_H
 
-#define KQEMU_MAJOR 254
+#define KQEMU_MAJOR 250
 
 #define KQEMU_VERSION 0x010000
#1 lore raw

Re: [Qemu-devel] [PATCH] Major 254

I am curious why qemu just doesn't set the device number to 0 (which would allow it to be assigned one by the kernel). Or was that feature removed when devfs was obsoleted?

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#2 lore raw

Re: [Qemu-devel] [PATCH] Major 254

Good question, I didn't even know that was possible; but if the major number was auto-assigned, how would the correct device node be created for it at install time?

D

Quoted 4 lines · Jim C. Brown

I am curious why qemu just doesn't set the device number to 0 (which would allow it to be assigned one by the kernel). Or was that feature removed when devfs was obsoleted?

Signature · 1 line
Darryl Dixon <[email protected]>
#3 lore raw

Re: [Qemu-devel] [PATCH] Major 254

Quoted 7 lines · Darryl Dixon

Good question, I didn't even know that was possible; but if the major number was auto-assigned, how would the correct device node be created for it at install time?

D

This feature was added when devfs was added - devfs would create the node (with the right major&minor number) automatically. I assume udev has something similar.

As a worst case option, the module can simply report which number it got in dmesg, and then one can create the node by hand.

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#4 lore raw

Re: [Qemu-devel] [PATCH] Major 254

In reply to Darryl Dixon
Quoted 3 lines

Good question, I didn't even know that was possible; but if the major number was auto-assigned, how would the correct device node be created for it at install time?

You could do it at load time by reading out of /proc/modules and creating the device node to fit.

Cheers,
Mark