Re: Problem Calling namei
Re: Problem Calling namei
- Subject: Re: Problem Calling namei
- From: Terry Lambert <email@hidden>
- Date: Tue, 29 Sep 2009 10:03:21 -0700
If you are implementing an "ls", you are doing it un user space so
what KPI is visible in the kernel should not be an issue for you.
For most things the correct API is getattrlist. For private
communication between your "ls" and a specific FS implementation
(presumably your own), fsctl/ioctl/fcntl are the interfaces to use. If
you use this approach, make sure your argument structure is size
invariant between 32 and 64 bit so you don't have to carry around
64/32 conversion functions, which can otherwise get hairy when taking
into account 32/64 user on 32/64 kernel. For example, if you need to
pass a pointer, pass it in a uint64_t/unsigned long long (you should
try to keep away from passing pointers and stay in the argument size
bounds for the *ctl copy in/out to avoid multiple u/k boundary
crossings, if at all possible).
-- Terry
On Sep 29, 2009, at 7:17 AM, mominabrar <email@hidden> wrote:
Hi,
I am trying to implement my filesystem specific ls (to give more
file info specific to my fs)
The issue is my kernel seems to be missing the namei family of
functions, namely:
int namei(struct nameidata *ndp);
void nameidone(struct nameidata *);
Obviously, also the header files lack definition for struct
nameidata. (bsd/sys/namei.h)
Any pointers on why they are missing or how i could achieve the same
functionality are appreciated.
#uname -a
Darwin macmini1 9.6.1 Darwin Kernel Version 9.6.1: Wed Dec 10
10:38:33 PST 2008; root:xnu-1228.9.75~3/RELEASE_I386 i386
Calling VNOP_LOOKUP in not an option, as all i have is a relative
path name.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden