quot.c (61106) | quot.c (69793) |
---|---|
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 61106 2000-05-31 01:04:22Z msmith $"; | 34 "$FreeBSD: head/usr.sbin/quot/quot.c 69793 2000-12-09 09:35:55Z obrien $"; |
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 <errno.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 <errno.h> |
47#include <paths.h> |
|
47#include <pwd.h> 48#include <stdio.h> 49#include <stdlib.h> 50#include <string.h> 51#include <unistd.h> 52 53/* some flags of what to do: */ 54static char estimate; --- 509 unchanged lines hidden (view full) --- 564 } 565 } 566 } 567 if (all) { 568 cnt = getmntinfo(&mp,MNT_NOWAIT); 569 for (; --cnt >= 0; mp++) { 570 if (!strncmp(mp->f_fstypename, "ufs", MFSNAMELEN)) { 571 if ((nm = strrchr(mp->f_mntfromname,'/'))) { | 48#include <pwd.h> 49#include <stdio.h> 50#include <stdlib.h> 51#include <string.h> 52#include <unistd.h> 53 54/* some flags of what to do: */ 55static char estimate; --- 509 unchanged lines hidden (view full) --- 565 } 566 } 567 } 568 if (all) { 569 cnt = getmntinfo(&mp,MNT_NOWAIT); 570 for (; --cnt >= 0; mp++) { 571 if (!strncmp(mp->f_fstypename, "ufs", MFSNAMELEN)) { 572 if ((nm = strrchr(mp->f_mntfromname,'/'))) { |
572 sprintf(dev,"/dev/%s",nm + 1); | 573 sprintf(dev,"%s%s",_PATH_DEV,nm + 1); |
573 nm = dev; 574 } else 575 nm = mp->f_mntfromname; 576 quot(nm,mp->f_mntonname); 577 } 578 } 579 } 580 while (--argc >= 0) 581 quot(*argv++,0); 582 return 0; 583} | 574 nm = dev; 575 } else 576 nm = mp->f_mntfromname; 577 quot(nm,mp->f_mntonname); 578 } 579 } 580 } 581 while (--argc >= 0) 582 quot(*argv++,0); 583 return 0; 584} |