linux - How can I create a fake device file to mimic dev/mem? -


i want control access dev/mem.

in order so, thinking of creating fake dev/mem, processes access instead of actual dev/mem.

my process modify dev/mem depending on changes in fake one.

is possible? if so, how do this?

look @ drivers/char/mem.c, in chr_dev_init(), remove register, class_create, device_create calls. move these calls driver , driver's read/write calls, directly call ones in mem.c


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

formula - R: how to pass in a reference to the variable in glm or lm? -