1SETQUOTA(2)                   System Calls Manual                  SETQUOTA(2)
2
3
4

NAME

6       setquota - enable/disable quotas on a file system
7

SYNOPSIS

9       setquota(special, file)
10       char *special, *file;
11

DESCRIPTION

13       Disc  quotas  are  enabled or disabled with the setquota call.  Special
14       indicates a block special device on which a mounted file system exists.
15       If  file is nonzero, it specifies a file in that file system from which
16       to take the quotas.  If file is 0, then quotas are disabled on the file
17       system.   The  quota  file  must exist; it is normally created with the
18       quotacheck(8) program.
19
20       Only the super-user may turn quotas on or off.
21

SEE ALSO

23       quota(2), quotacheck(8), quotaon(8)
24

RETURN VALUE

26       A 0 return value indicates  a  successful  call.   A  value  of  -1  is
27       returned  when  an error occurs and errno is set to indicate the reason
28       for failure.
29

ERRORS

31       Setquota will fail when one of the following occurs:
32
33       [ENOTDIR]      A component of either path prefix is not a directory.
34
35       [EINVAL]       Either pathname contains a character with the high-order
36                      bit set.
37
38       [EINVAL]       The kernel has not been compiled with the QUOTA option.
39
40       [ENAMETOOLONG] A  component of either pathname exceeded 255 characters,
41                      or the entire length of either path name  exceeded  1023
42                      characters.
43
44       [ENODEV]       Special does not exist.
45
46       [ENOENT]       File does not exist.
47
48       [ELOOP]        Too  many symbolic links were encountered in translating
49                      either pathname.
50
51       [EPERM]        The caller is not the super-user.
52
53       [ENOTBLK]      Special is not a block device.
54
55       [ENXIO]        The major device number of special is out of range (this
56                      indicates  no  device  driver  exists for the associated
57                      hardware).
58
59       [EROFS]        File resides on a read-only file system.
60
61       [EACCES]       Search permission is denied for a  component  of  either
62                      path prefix.
63
64       [EACCES]       File resides on a file system different from special.
65
66       [EACCES]       File is not a plain file.
67
68       [EIO]          An  I/O  error occurred while reading from or writing to
69                      the file containing the quotas.
70
71       [EFAULT]       Special or path points outside the  process's  allocated
72                      address space.
73

BUGS

75       The  error  codes are in a state of disarray; too many errors appear to
76       the caller as one value.
77
78
79
804.2 Berkeley Distribution       August 26, 1985                    SETQUOTA(2)
Impressum