The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
A small minix question sasa Shell Programming and Scripting 2 05-21-2007 02:20 PM
Minix Installation deadrobot UNIX for Dummies Questions & Answers 2 03-26-2004 11:01 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-21-2008
Registered User
 

Join Date: Feb 2008
Posts: 7
sys_datacopy in Minix

I'm writing a program that must log all the kernel calls existing in Minix. I recall that Minix is a microkernel OS.

I've a user process that pass a char* that points to a buffer memory to the kernel level. In the kernel level I get all the information, and now, I would like to copy the info to the buffer passed by the user. How can I do that?

Since kernel and user process are in different address space, I use the sys_datacopy function that should do it.

The problem is that, in the user level, that buffer prints me (null).

the function that I use is:

sys_datacopy(SELF,
(vir_bytes) buf,
who, /* <---- I suppose that this in points to the user process number */
(vir_bytes) m_in.m1_p1);


m_in is a structure of type message, a structure that Minix uses to pass info from the kernel to the user level and otherwise.

m1_p1 is a char* variable.

You can find it more info about the structure in ipc.h.

Thanks,
Pedro
Reply With Quote
Forum Sponsor
  #2  
Old 02-21-2008
Registered User
 

Join Date: Feb 2008
Posts: 7
I think that this problem is the who variable. I'm passing the MM constant. Maybe I must get the process number of my user program.

Thanks,
Pedro
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0