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/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux