LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Block Device , fdisk (https://www.linuxquestions.org/questions/programming-9/block-device-fdisk-810813/)

Dufresne 05-28-2010 05:06 PM

Block Device , fdisk
 
Hi!
I have a block device module. It works but not the way i need.
After i insert module , i have to create partitions with "fdisk" command.
What i need is , with inserting module , it shall also create partitions for it.
Without using "fdisk" command , it shall create partitions.
How can i do it ?

syg00 05-28-2010 05:40 PM

Probably need to re-think what you need - this belongs in user-space. Maybe use udev to fire off your partitioning code (even sfdisk with a script) when the device you create appears.

Dufresne 05-28-2010 06:35 PM

I know it belongs user-space but it shall be a way to achieve it on kernel-space.


All times are GMT -5. The time now is 11:05 AM.