.\" -*- nroff -*- .\" .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .TH QUOTACTL 2 "14/04/1996" "Linux 1.3.88" "Manual do Programador Linux" .SH NOME quotactl \- manipula as quotas de disco .SH SINOPSE .B #include .br .B #include .sp .BI "int quotactl (int " cmd ", const char *" special ", int " id .BI ", caddr_t " addr ); .sp .B #include .sp .BI "_syscall4(int, quotactl, int, " cmd ", const char *, " special .BI ", int, " id ", caddr_t, " addr ); .SH DESCRIÇÃO O sistema de quotas define para cada usuário e/ou grupo um limite flexível e um limite inflexível restringindo a quantidade de espaço em disco que pode ser usado em um sistema de arquivos. O limite inflexível não pode ser cruzado. O limite flexível pode ser cruzado, mas avisos virão. Além disso, o usuário não pode ficar acima do limite flexível por mais que uma semana (padrão) em um determinado tempo: depois desta semana o limite flexível funciona com um limite inflexível. A chamada de sistema .B quotactl manipula esta quota. Seu primeiro argumento é da forma .IB QCMD( subcmd , type ) onde .I type é um dos dois .B USRQUOTA ou .B GRPQUOTA (para quota de usuário e grupo, respectivamente), e .I subcmd é descrito abaixo. O segundo argumento .I special é um dispositivo de bloco onde será aplicada a quota. Ele deve estar montado. O terçeiro argumento .I id é a ID do usuário ou grupo que esta quota será aplicada (quando relevante). o quarto argumento .I addr é o endereço da estrutura de dados, dependendo do comando. O .I subcmd é um dos .TP 1.1i .B Q_QUOTAON Habilita quotas. O .I addr argumento é o caminho de busca do arquivo contendo as quotas para o sistema de arquivos. .TP .B Q_QUOTAOFF Desabilita quotas. .TP .B Q_GETQUOTA Obtém limites e uso corrente do espaço de disco. o argumento .I addr é um ponteiro para uma estrutura dqblk (definida em .IR ). .TP .B Q_SETQUOTA Seleciona limites e uso atual; .I addr é como antes. .TP .B Q_SETQLIM Seleciona limites; .I addr é como antes. .TP .B Q_SETUSE Seleciona o uso. .TP .B Q_SYNC Sincroniza uma cópia do disco para um sistema de arquivos quota. .TP .B Q_GETSTATS Obtém estatísticas. .SH "VALORES RETORNADOS" Em caso de sucesso, .B quotactl retorna 0. Caso contrário, \-1 é retornado, e .I errno é selecionado adequadamente. .SH ERROS .TP 0.9i .B ENOPKG O kernel foi compilado sem suporte para quotas. .TP .B EFAULT Valor .I addr ruim. .TP .B EINVAL .I tipo não é um tipo de quota conhecido. Ou, .I special não pode ser achado. .TP .B ENOTBLK .I special não é dispostivo de bloco. .TP .B ENODEV .I special não pode ser achado na tabela de montagem. .TP .B EACCES O arquivo quota não é um arquivo ordinário. .TP .B EIO Não se pode ler ou escrever no arquivo quota. .TP .B EMFILE Muitos arquivos abertos: não pode abrir o arquivo de quota. .TP .B EBUSY .B Q_QUOTAON foi questionado, mas quota já está habilitado. .TP .B ESRCH .B Q_GETQUOTA ou .B Q_SETQUOTA ou .B Q_SETUSE ou .B Q_SETQLIM foi questionado por um sistema de arquivos que não tem quota habilitada. .TP .B EPERM O processo não é do super-usuário (para o sistema de arquivos), e .B Q_GETQUOTA foi questionado por outra .I id que aquele mesmo do processo, ou qualquer coisa a não ser .B Q_GETSTATS ou .B Q_SYNC foi questionada. .SH "DE ACORDO COM" BSD .SH "VEJA TAMBÉM" .BR quota (1), .BR getrlimit (2), .BR setrlimit (2), .BR ulimit (2), .BR quotacheck (8), .BR quotaon (8) .SH TRADUZIDO POR LDP-BR em 21/08/2000 \&\fR\&\f(CWAndré L. Fassone Canova (tradução)\fR \&\fR\&\f(CWxxxxxxxxxxxxxxxxxxxxxxxxx (revisão)\f