site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=R6hMpq9VHIIuduZPhTq1eBIXEBb04jW8D+bKhKRfO/0jE4Pj9U/LOxy3UIbd9mjV9oqMr5/arfhg5+oBgcFRXH+xXb91TrGIKChSQdvxF3nBNIncRy5aQLYGkPRTYP45eEcYfQZBGJ0UZc93JZeD0kL2NrgsNqdgEiyqOmQ/LPg= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=eAKSJWP8/idT1SlpDu2LhpmTZ74ABObE/XGMEgAsc1OMVrADKycVzFwWn3TLE3bmAaC8vhW369NK3qOVtUZujXI2pmqZ1h/qxaSzQ9zCMCh6IPRUUfH7VpE1B4dUfkRK5kuYO14oLb0eRc9WUm877Oc1weWDyGndlNB3zEMGzPc= Hello! I've noticed, that operations related to a given filesystem are handled via an array of function pointers named `v_op'. I am now wondering, what's the best way to reference this array. I'd like to use the `getxattr()' function within a kernel extension. As I'm unable to use v_op, I've tried to find a "general" function for `getxattr()'. After a bit of exploration, I've found : `vn_getxattr()' which seems the right thing to use. This is how I've tried to use it : ==== #include <mach/mach_types.h> #include <libkern/libkern.h> #include <libkern/OSAtomic.h> #include <libkern/OSMalloc.h> #include <sys/sysctl.h> #include <sys/kauth.h> #include <sys/vnode.h> #include <sys/xattr.h> /* .... */ char val[VAL_SIZE]; if ( vn_getxattr( (vnode_t)vn, KEY_NAME, val, VAL_SIZE, 0, NULL) == -1) { /* .... */ ==== The build succeeds, but trying to load the module fails due to linking errors : === kld(): Undefined symbols: _vn_getxattr kextload: kld_load_from_memory() failed for module /Users/marco/vnode_example/build/Release/vnode_example.kext/Contents/MacOS/vnode_example === I'm now wondering what have I missed. What would be the best way to access VFS operations given a valid vnode? _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com