Deleted Added
full compact
quot.c (22997) quot.c (28160)
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:

--- 16 unchanged lines hidden (view full) ---

25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
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
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:

--- 16 unchanged lines hidden (view full) ---

25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
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 char rcsid[] = "$Id$";
33static char rcsid[] = "$Id: quot.c,v 1.5 1997/02/22 16:12:39 peter Exp $";
34#endif /* not lint */
35
36#include <sys/param.h>
37#include <sys/mount.h>
38#include <sys/time.h>
39#include <ufs/ffs/fs.h>
40#include <ufs/ufs/quota.h>
41#include <ufs/ufs/inode.h>

--- 47 unchanged lines hidden (view full) ---

89
90 if (!ip || ino < last || ino >= last + INOCNT(super)) {
91 if (!ip
92 && !(ip = (struct dinode *)malloc(INOSZ(super)))) {
93 perror("allocate inodes");
94 exit(1);
95 }
96 last = (ino / INOCNT(super)) * INOCNT(super);
34#endif /* not lint */
35
36#include <sys/param.h>
37#include <sys/mount.h>
38#include <sys/time.h>
39#include <ufs/ffs/fs.h>
40#include <ufs/ufs/quota.h>
41#include <ufs/ufs/inode.h>

--- 47 unchanged lines hidden (view full) ---

89
90 if (!ip || ino < last || ino >= last + INOCNT(super)) {
91 if (!ip
92 && !(ip = (struct dinode *)malloc(INOSZ(super)))) {
93 perror("allocate inodes");
94 exit(1);
95 }
96 last = (ino / INOCNT(super)) * INOCNT(super);
97 if (lseek(fd,ino_to_fsba(super,last) << super->fs_fshift,0) < 0
97 if (lseek(fd, (off_t)ino_to_fsba(super, last) << super->fs_fshift, 0) < (off_t)0
98 || read(fd,ip,INOSZ(super)) != INOSZ(super)) {
99 perror("read inodes");
100 exit(1);
101 }
102 }
103
104 return ip + ino % INOCNT(super);
105}

--- 484 unchanged lines hidden ---
98 || read(fd,ip,INOSZ(super)) != INOSZ(super)) {
99 perror("read inodes");
100 exit(1);
101 }
102 }
103
104 return ip + ino % INOCNT(super);
105}

--- 484 unchanged lines hidden ---