Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fsctl(2) [opendarwin man page]

FSCTL(2)						      BSD System Calls Manual							  FSCTL(2)

fsctl -- control filesystems SYNOPSIS
#include <sys/attr.h> #include <sys/ioctl.h> int fsctl(const char *path, unsigned long request, void *data, unsigned long options); DESCRIPTION
The fsctl() function manipulates the filesystem controlling mounted volumes. In particular, many filesystem-specific operating characteris- tics of mounted filesystems may be controlled with fsctl() requests. fsctl() requests can also be used to extract filesystem-specific infor- mation for a mounted volumes. path is the path name of any file within the mounted filesystem. An fsctl request has encoded in it whether the argument is an ``in'' parameter or ``out'' parameter, and the size of the argument data in bytes. Values for request are entirely filesystem-specific except for the following, defined in <sys/fsctl.h>: FSGETMOUNTINFOSIZE /* Return size of mount info data */ Macros and defines used in specifying an fsctl request are the same as for ioctl() requests and are located in the file <sys/ioccom.h>. options may specify special flags for the processing of the fsctl() call. The options are specified by or'ing the option values. The only option currently defined is #define FSOPT_NOFOLLOW 0x00000001 /* Don't follow symlinks */ which is interpreted by the fsctl() call to prevent following of symlinks. The options argument is passed to the filesystem, which may define and handle additional options bit values. RETURN VALUES
If an error has occurred, a value of -1 is returned and errno is set to indicate the error. ERRORS
fsctl() will fail if: [ENOTDIR] A component of the path prefix is not a directory. [ENAMETOOLONG] A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters. [ENOENT] The named file does not exist. [EACCES] Search permission is denied for a component of the path prefix. [ELOOP] Too many symbolic links were encountered in translating the pathname. [EFAULT] path or data points to an invalid address. [EIO] An I/O error occurred while reading from or writing to the file system. [EINVAL] request or data is not valid. SEE ALSO
ioctl(2), getattrlist(2), setattrlist(2) HISTORY
The fsctl() function call appeared in Mac OS X version 10.0. Mac OS X January 14, 2003 Mac OS X

Check Out this Related Man Page

REMOVEXATTR(2)						      BSD System Calls Manual						    REMOVEXATTR(2)

removexattr, fremovexattr -- remove an extended attribute value SYNOPSIS
#include <sys/xattr.h> int removexattr(const char *path, const char *name, int options); int fremovexattr(int fd, const char *name, int options); DESCRIPTION
Extended attributes extend the basic attributes associated with files and directories in the file system. They are stored as name:data pairs associated with file system objects (files, directories, symlinks, etc). removexattr() deletes the extended attribute name associated with path. An extended attribute's name is a simple NULL-terminated UTF-8 string. Options is a bit mask specifying various options: XATTR_NOFOLLOW do not follow symbolic links. Normally, removexattr() acts on the target of path if it is a symbolic link. With this option, removexattr() will act on the link itself. XATTR_SHOWCOMPRESSION removexattr() and fremovexattr() will remove HFS Plus Compression extended attribute name (if present) for the file referred to by path or fd. fremovexattr() is identical to removexattr(), except that it removes an extended attribute from an open file referenced by file descriptor fd. RETURN VALUES
On success, 0 is returned. On failure, -1 is returned and the global variable errno is set as follows. ERRORS
[ENOATTR] The specified extended attribute does not exist. [ENOTSUP] The file system does not support extended attributes or has the feature disabled. [EROFS] The file system is mounted read-only. [EPERM] This type of object does not support extended attributes. [EINVAL] name or options is invalid. name must be valid UTF-8 options must make sense. [ENOTDIR] A component of the path 's prefix is not a directory. [ENAMETOOLONG] Name exceeded XATTR_MAXNAMELEN UTF-8 bytes, or a component of path exceeded NAME_MAX characters, or the entire path exceeded PATH_MAX characters. [EACCES] Search permission is denied for a component path or permission to remove the attribute is denied. [ELOOP] Too many symbolic links were encountered in path. [EFAULT] path or name points to an invalid address. [EIO] An I/O error occurred while reading from or writing to the file system. SEE ALSO
getxattr(2), listxattr(2), setxattr(2) HISTORY
removexattr() and fremovexattr() first appeared in Mac OS X 10.4. Mac OS X Oct 19, 2004 Mac OS X
Man Page