Re: Cannot open from user space a misc device - why ?

2009-02-24 Thread Peter Teoh
Oh yes, i do "make tags" (for Linux kernel source) or "find . -name '*.c' -o -name '*.h' > cpp.dat" and "ctags `cat cpp.dat`" whenever possible as well. Taught to us (kernelnewbies group) by Rene Herman in the past - does anyone what has happened to him? But I do have a problem, which lxr (+sea

Re: Generating custom kernel uevents.

2009-02-24 Thread Greg KH
On Tue, Feb 24, 2009 at 09:04:31AM +0200, Daniel Baluta wrote: > On Tue, Feb 24, 2009 at 6:51 AM, Greg KH wrote: > > On Mon, Feb 23, 2009 at 02:02:14PM +0200, Daniel Baluta wrote: > >> Hello , > >> > >> I want to generate custom kernel events. This events will be > >> interpreted by the udev in us

Re: Cannot open from user space a misc device - why ?

2009-02-24 Thread Thomas Rega
hi peter did you ever gave a try to ctags in 'alliance' with vim? just a hint ... http://scottr.org/blog/2008/feb/24/ctags-and-vim/ have fun TR Am Dienstag, den 24.02.2009, 11:44 -0500 schrieb Peter Teoh: > On Tue, Feb 24, 2009 at 3:38 AM, Thomas Petazzoni > wrote: > > Le Tue, 24 Feb 2009

Re: Cannot open from user space a misc device - why ?

2009-02-24 Thread Peter Teoh
On Tue, Feb 24, 2009 at 3:38 AM, Thomas Petazzoni wrote: > Le Tue, 24 Feb 2009 09:11:53 +0800, > Peter Teoh a écrit : > >> But then it also puzzled me, because ioctl() in user space required a >> open file descriptor as the first parameter, which is derived from >> open() (as specified from "man

Re: strlen-like function for pointers? ptrlen?

2009-02-24 Thread Nelson Castillo
>> If it doesn't exist -- do you see something that could go wrong with a >> ptrlen function? Would upstream like it? > > There is only one possibility: Just try and propose it. Create such a > function for your part, send a patch and plain simply ask if people feel > that the function should move

Re: ARM Linux at91: installing Timer Controller Interrupt

2009-02-24 Thread Ole Loots
Hi there, Thanks for the help. This code works: /* * Kernel interrupt demo for Timer Channel 0 * Author : * Date: 24.02.2009 * Version : 1.00 * License : GPL */ #include #include #include #include #include #include #include #include #include #include #include #includ

Re: Cannot open from user space a misc device - why ?

2009-02-24 Thread Belisko Marek
Hi, my previous post with open method seems to be wrong. On Sun, Feb 22, 2009 at 8:11 PM, Kevin Wilson wrote: > Hello, > >  Following is a simple kernel module of 40 lines which only registers a > misc device. I insmod the module and it is ok; the return value of > misc_register() is 0. > ls -al

Re: strlen-like function for pointers? ptrlen?

2009-02-24 Thread Bernd Petrovitsch
On Tue, 2009-02-24 at 20:24 +0800, Nelson Castillo wrote: > Hi there. > > Is there a strlen-like function for pointers? I have this code: > > struct ts_filter_api **api_r = api; > int count = 0; > /* find out how many filters we need to create */ > while (*api_r) { > count++; > api_r++; > } >

strlen-like function for pointers? ptrlen?

2009-02-24 Thread Nelson Castillo
Hi there. Is there a strlen-like function for pointers? I have this code: struct ts_filter_api **api_r = api; int count = 0; /* find out how many filters we need to create */ while (*api_r) { count++; api_r++; } and I would like to have it replaced with ptrlen(api); If it doesn't exist --

Nodes having same key values in Red-Black Tree

2009-02-24 Thread Sukanto Ghosh
Hi, I am referring to the red-black tree implementation in the linux kernel. I have read in an article (http://lwn.net/Articles/184495/) that " ... There is an important assumption built into the above example: the new value being inserted into the tree is not already present there. If that assu

Re: Cannot open from user space a misc device - why ?

2009-02-24 Thread Thomas Petazzoni
Le Tue, 24 Feb 2009 09:11:53 +0800, Peter Teoh a écrit : > But then it also puzzled me, because ioctl() in user space required a > open file descriptor as the first parameter, which is derived from > open() (as specified from "man ioctl"). so then how is the open() > from userspace passed down