problem with System call!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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/
-
: 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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux