![]() |
|
#1
|
|||
|
|||
Write a kernel code for a new system callI am a beginner kernel programmer. I need to write a kernel code for a new system call called
int sys_printstr(void *buf); This system call returns the usual success/failure codes. The buf argument that it gets is an encoded string as follows:
Any clue/suggestion? Thanks in advance. |
|||
|
#2
|
||||
|
||||
Re: Write a kernel code for a new system callQuote:
Yeah. I'd ask this question in a Linux-specific forum area. This is an OpenGL forum for platform agnostic 2D and 3D graphics processing. If you're looking for help with the C code needed to implement the function, you may want to try the C programming language forum area. http://www.gidforums.com/f-41.html Basically, you will want to cast buf (if not NULL) to an unsigned char* (check your data type names for the actual typename to use). Then you will want to call printk with %s and pass-n-cast the address of buf[1] to a char* if the first byte is not zero. MxB |
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can anyone change this program for linux kernel? | nancycoder | C Programming Language | 4 | 05-Oct-2008 06:52 |
| RedHat Linux memory problem | nzmose | Computer Software Forum - Linux | 1 | 02-Aug-2008 10:07 |
| Printing problems--->ARG! | toddm123 | .NET Forum | 0 | 31-Mar-2005 13:51 |
| kernel compiling & Geforce updating | crystalattice | Computer Software Forum - Linux | 5 | 16-Jun-2004 08:38 |
| Linux Kernel Upgrade Mini Howto | dsmith | Computer Software Forum - Linux | 3 | 05-Apr-2004 23:10 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The