Maybe I had misunderstood your meaning. You are meaning I have assign 0 to my device major number? The major variable is reassigned by the kernel in blkplay_init function.
http://stackoverflow.com/questions/13518404/add-disk-hangs-on-insmod <http://stackoverflow.com/questions/13518404/add-disk-hangs-on-insmod> This post solve the problem. Now, I can compile it, insmod it. But it’s give me a permission error when I open the device. > On Mar 21, 2016, at 10:55 AM, valdis.kletni...@vt.edu wrote: > > On Mon, 21 Mar 2016 09:53:47 +0800, 张云 said: >> The code is just for learning block driver > > THe kernel doesn't know that. You call a routine with the wrong > parameters, it will not work properly.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies