Skip to main content

Posts

Showing posts from March, 2010

Writing a Simple Character Device driver in Linux

A Character device driver needs a major number and a minor number. The devices are registered in the Kernel and it lies either in the /dev/ or in the /proc folder.

The following example uses a char device driver with major number 222 and a minor number 0. The name of the device driver namely “new_device

It uses the following things

Open or register a device
close or unregister the device
Reading from the device (Kernel to the userspace)
Writing to the device (userlevel to the kernel space)

There are three files, Copy the following or download all the three files here

/* new_dev.c*/

#include<linux/module.h>
#include<linux/init.h>
#include "new_dev.h"

MODULE_AUTHOR("PRADEEPKUMAR");
MODULE_DESCRIPTION("A simple char device");

static int r_init(void);
static void r_cleanup(void);

module_init(r_init);
module_exit(r_cleanup);

static int r_init(void)
{
printk("<1>hi\n");
if(register_chrdev(222,"new_device",&my_fops)){
printk("<1>f…

Top 10 Moodle Myths

Once Moodle is stable, it will be put under licence. If it were any good, they’d already be charging for itMoodle needs a full time, php developer on your staff- or at least a lot of technical support to run it in houseMoodle won’t be compatible with our other systems/softwareMoodle just doesn’t have the commercial experience we’re looking forYou can’t just use Moodle out of the box – the basic Moodle install just isn’t that sophisticatedThere’s no documentation, training or technical support available – you’re on your ownThe Total Cost of Ownership is actually higher for Moodle than it would be with a wholly commercial platformMoodle is just no good for an institution as large as mineMoodle is just not designed to cope with my specific group of learners or customersWe have all our stuff on *******, it’s just not worth the hassle of switching to MoodleSource: http://docs.moodle.org/en/Top_10_Moodle_Myths