problem with System call!!

From: Pavan Kumar Achanta (achantap@yahoo.com)
Date: Tue Apr 02 2002 - 03:59:40 EST


Hi all,

   I was tring to implement the standard pedagogictime system
call from 'nutt'.. It got compiled but got an error :

   Error while loading shared libraries : libc.80.6 Cannot
stat shared object: Error 14 /sbin/mingetty

 when I restart with the new kernel image
  And this is what I did .....

********* step1 *******************
/usr/src/linux/arch/i386/kernel/entry.S

.data
ENTRY(sys_call_table)
    .long SYMBOL_NAME(sys_ni_syscall) /* 0 - old "setup()"
system call*/
    .long SYMBOL_NAME(sys_exit)
    .long SYMBOL_NAME(sys_fork)
    .long SYMBOL_NAME(sys_read)
    .long SYMBOL_NAME(sys_write)
    .long SYMBOL_NAME(sys_open) /* 5 */
        
        ..................

    .long SYMBOL_NAME(sys_ni_syscall) /* streams1 */
    .long SYMBOL_NAME(sys_ni_syscall) /* streams2 */
    .long SYMBOL_NAME(sys_vfork) /* 190 */
        
    .long SYMBOL_NAME(sys_pedagogictime) /* 191 */
 
    .rept NR_syscalls-191 //change number -190 to -191
        .long SYMBOL_NAME(sys_ni_syscall)
    .endr

it was NR_syscalls-221 and changed it to NR_syscalls-191

//********* step2 *******************
And one more line to file /usr/src/linux/include/asm/unistd.h

#define __NR_sigaltstack 186
#define __NR_sendfile 187
#define __NR_getpmsg 188 /* some people actually want
streams */
#define __NR_putpmsg 189 /* some people actually want
streams */
#define __NR_vfork 190
#define __NR_pedagogictime 191 /*Bill add this line for lab4 */

Here I didnt know what to do about the already existing
#define __NR_mmap 191 so I just kept it as it is..
  Can somebody tell me what the line

  .rept NR_syscalls-191 //change number -190 to -191
        .long SYMBOL_NAME(sys_ni_syscall)
    .endr

  means and how the whole thing works!!! and what is the right
way to add a system call ....

     Thanks a lot
  Pavan

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://http://taxes.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html



This archive was generated by hypermail 2b29 : Sun Apr 07 2002 - 22:00:01 EST