quot.c (69793) | quot.c (74071) |
---|---|
1/* 2 * Copyright (C) 1991, 1994 Wolfgang Solfrank. 3 * Copyright (C) 1991, 1994 TooLs GmbH. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32#ifndef lint 33static const char rcsid[] = | 1/* 2 * Copyright (C) 1991, 1994 Wolfgang Solfrank. 3 * Copyright (C) 1991, 1994 TooLs GmbH. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32#ifndef lint 33static const char rcsid[] = |
34 "$FreeBSD: head/usr.sbin/quot/quot.c 69793 2000-12-09 09:35:55Z obrien $"; | 34 "$FreeBSD: head/usr.sbin/quot/quot.c 74071 2001-03-10 12:12:47Z ps $"; |
35#endif /* not lint */ 36 37#include <sys/param.h> 38#include <sys/mount.h> 39#include <sys/time.h> 40#include <ufs/ffs/fs.h> 41#include <ufs/ufs/quota.h> 42#include <ufs/ufs/inode.h> 43 44#include <err.h> 45#include <fcntl.h> | 35#endif /* not lint */ 36 37#include <sys/param.h> 38#include <sys/mount.h> 39#include <sys/time.h> 40#include <ufs/ffs/fs.h> 41#include <ufs/ufs/quota.h> 42#include <ufs/ufs/inode.h> 43 44#include <err.h> 45#include <fcntl.h> |
46#include <fstab.h> |
|
46#include <errno.h> 47#include <paths.h> 48#include <pwd.h> 49#include <stdio.h> 50#include <stdlib.h> 51#include <string.h> 52#include <unistd.h> 53 --- 467 unchanged lines hidden (view full) --- 521} 522 523int 524main(argc,argv) 525 char **argv; 526{ 527 char all = 0; 528 struct statfs *mp; | 47#include <errno.h> 48#include <paths.h> 49#include <pwd.h> 50#include <stdio.h> 51#include <stdlib.h> 52#include <string.h> 53#include <unistd.h> 54 --- 467 unchanged lines hidden (view full) --- 522} 523 524int 525main(argc,argv) 526 char **argv; 527{ 528 char all = 0; 529 struct statfs *mp; |
530 struct fstab *fs; |
|
529 char dev[MNAMELEN + 1]; 530 char *nm; 531 int cnt; 532 533 func = douser; 534#ifndef COMPAT 535 header = getbsize(&headerlen,&blocksize); 536#endif --- 36 unchanged lines hidden (view full) --- 573 sprintf(dev,"%s%s",_PATH_DEV,nm + 1); 574 nm = dev; 575 } else 576 nm = mp->f_mntfromname; 577 quot(nm,mp->f_mntonname); 578 } 579 } 580 } | 531 char dev[MNAMELEN + 1]; 532 char *nm; 533 int cnt; 534 535 func = douser; 536#ifndef COMPAT 537 header = getbsize(&headerlen,&blocksize); 538#endif --- 36 unchanged lines hidden (view full) --- 575 sprintf(dev,"%s%s",_PATH_DEV,nm + 1); 576 nm = dev; 577 } else 578 nm = mp->f_mntfromname; 579 quot(nm,mp->f_mntonname); 580 } 581 } 582 } |
581 while (--argc >= 0) 582 quot(*argv++,0); | 583 while (--argc >= 0) { 584 if ((fs = getfsfile(*argv)) != NULL) 585 quot(fs->fs_spec, 0); 586 else 587 quot(*argv,0); 588 argv++; 589 } |
583 return 0; 584} | 590 return 0; 591} |