namei(9) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

namei(9)

The  facility  allows  the client to perform pathname translation
and lookup operations.  The functions will increment  the  refer‐
ence count for the vnode in question.  The reference count has to
be decremented after use of the vnode, by using either or depend‐
ing  on  whether  the flag was specified or not.  The function is
used to initialize components.  It takes the following arguments:
The to initialize.  The operation which will perform.   The  fol‐
lowing  operations are valid: and The latter three are just setup
for those effects; just calling will not result in being  called.
Operation  flags.   Several of these can be effective at the same
time.  UIO segment indicator.  This indicates if the name of  the
object  is in userspace or in the kernel address space Pointer to
the component's pathname buffer (the file or directory name  that
will be looked up).  The thread context to use for operations and
locks.   The  function  takes the following set of that influence
its operation: Lock vnode on return with unless is also set.  The
should be used to release the lock (or  which  is  equivalent  to
calling followed by all in one).  This flag lets the function re‐
turn  the parent (directory) vnode, in locked state, unless it is
identical to in which case is not  locked  per  se  (but  may  be
locked  due to If a lock is enforced, it should be released using
or and Lock vnode on return with The should be  used  to  release
the  lock  (or  which is equivalent to calling followed by all in
one).  This flag allows the function to return the parent (direc‐
tory) vnode in an unlocked state.  The parent vnode must  be  re‐
leased separately by using Avoid creating this entry in the name‐
cache  if  it is not already present.  Normally, will add entries
to the name cache if they are not already there.  With this flag,
will follow the symbolic link if the last part of the  path  sup‐
plied  is a symbolic link (i.e., it will return a vnode for what‐
ever the link points at, instead for the link  itself).   Do  not
follow  symbolic  links (pseudo).  This flag is not looked for by
the actual code, which looks for  is  used  to  indicate  to  the
source  code reader that symlinks are intentionally not followed.
Do not free the pathname buffer at the end of the invocation; in‐
stead, free it later in so that the caller may access  the  path‐
name buffer.  See below for details.  Retain an additional refer‐
ence  to  the  parent directory; do not free the pathname buffer.
See below for details.  The structure is composed of the  follow‐
ing fields: In the normal case, this is either the current direc‐
tory or the root.  It is the current directory if the name passed
in  does not start with and we have not gone through any symlinks
with an absolute path, and the root otherwise.  In this case,  it
is  only  used by and should not be considered valid after a call
to If is set, this is set to the same as with an extra  To  block
from releasing the can be set.  Vnode pointer to directory of the
object  on  which lookup is performed.  This is available on suc‐
cessful return if or is set.  It is locked if  is  set.   Freeing
this in can be inhibited by or (with the obvious effects).  Vnode
pointer  to  the  resulting object, otherwise.  The field of this
vnode is incremented.  If is set, it  is  also  locked.   Freeing
this  in  can be inhibited by or (with the obvious effects).  The
pathname buffer contains the location of the  file  or  directory
that  will  be used by the operations.  It is managed by the zone
allocation interface.  If the or flag is set, then  the  pathname
buffer  is available after calling the function.  To only deallo‐
cate resources used by the pathname  buffer,  then  flag  can  be
passed  to the function.  To keep the pathname buffer intact, the
flag can be passed to the function.  If successful,  will  return
0, otherwise it will return an error.  Errors which may return: A
component of the specified pathname is not a directory when a di‐
rectory  is  expected.   A  component  of a pathname exceeded 255
characters, or an entire pathname exceeded  1023  characters.   A
component  of the specified pathname does not exist, or the path‐
name is an empty string.  An attempt is made to access a file  in
a  way  forbidden  by its file access permissions.  Too many sym‐
bolic links were encountered in translating the pathname.  An at‐
tempt is made to open a directory with write mode specified.  The
last component of the pathname specified for a or operation is An
attempt is made to modify a file or directory on a read-only file
system.  This manual page was written by and later  significantly
revised  by  The  flag does not always result in the parent vnode
being locked.  This results in complications when  the  is  used.
In  order to solve this for the cases where both and are used, it
is necessary to resort to recursive locking.

























































맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3