Forum Settings
« Previous 0 Next »
Reply To Thread

Structs and Kernels can go diaf.

#1 Dec 09 2012 at 10:58 AM Rating: Good
I'm assuming that you're using Linux here. copy_from_user is your friend. If you want to send data the other way, copy_to_user is your other friend.

Yes, doing file IO is not a good idea in kernel space unless you're a file system or disk driver. If you're just looking to log stuff for your development and debugging, use printk (KERN_ERR "Your message", ...). You can see the output by running dmesg from any terminal. Or, what I do is run in a real text terminal and you'll see the output as its generated. For most distros you can press Ctrl+Alt+F1 to switch into a text-mode terminal. Ctrl+Alt+F7 will bring you back to your GUI (X) terminal. (Some of the newer distros have made the 'F1' terminal the GUI terminal. If so just do a Ctrl+Alt+F2 for a text terminal.)

I've been doing kernel mode development for over 10 years in Linux and Windows (and now VxWorks). I've also started writing my own operating system from scratch. I'm kind of a nerd for this kind of stuff.
« Previous 0 Next »
Reply To Thread

Colors Smileys Quote OriginalQuote Checked Help


Recent Visitors: 0 All times are in CDT