Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .sy_narg definition



On Tuesday, March 26, 2002, at 11:21 AM, David Blanton wrote:

On Wednesday, March 20, 2002, at 04:59 PM, Stefan Arentz wrote:

Patching BSD syscalls? Evil! But possible :-)

int32_t saved_open = sysent[SYS_open].sy_call;
sysent[10].sy_call = (int32_t) &my_open;



Well, don't count on it being that easy. The symbols are going away in the future release.
And it is also possible that the table may be "read only". So code above as is will cause a kernel panic...



------------------
I implemented this code via a KEXT and my routine is called when a file is
opened.

A question if I may:

Where do I find the definition of the argument list for SYS_open

.sy_narg tells me how many but what are they and how are they passed?

Thanks,

db

Please do not patch system call table. I bet there are other ways of achieving what you want to do ...


Thanks,
--Umesh
--
Umesh Vaishampayan Apple Computer, Inc.
Mac OS X Kernel Ph: (408) 974 0229
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.

References: 
 >.sy_narg definition (From: David Blanton <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.