Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.arcetri.astro.it/irlab/doc/library/linux/khg/HyperNews/get/khg/135/1.html
Дата изменения: Thu Mar 23 12:37:41 2000
Дата индексирования: Wed Sep 15 04:08:05 2010
Кодировка:

Поисковые слова: storm
Creating a new sytem call: solution The HyperNews Linux KHG Discussion Pages

Idea: Creating a new sytem call: solution

Forum: The Linux Kernel Hackers' Guide
Re: Question Problem creating a new system call
Date: Sun, 12 Oct 1997 06:32:03 GMT
From: C.H.Gopinath <gopich@cse.iitb.ernet.in>

The problem is using printk, it won't print on the stdout,
it will be stored in the buffers. If you want the data
to be displayed on the stdout use

	sys_write(1,ptr,len);

where ptr is the string to be displayed and len is its length.

Using this you can check your sys call is created or not.

But regarding assigning a value to a global variable or local
variable i don't know. I am also struggling for the past
one week. I tried to assign and print a string in the system
call. It is compiling without any problem butwhen i try to
execute that, at the assignment it is giving 

General Protection:000
and then dumping all the register values with Segmentation 
Fault.

Can cny body explain why it is happeing like this.

By the by is there any kernel debugging tool for 4.2 kernel,
if so can anybody please give pointers for that.

Thanx in advance,
			--
				C.H.Gopinath
				gopich@cse.iitb.ernet.in


Messages

1. Feedback: Kernel Debuggers for Linux by sauru newest