Deleted Added
full compact
cgroup.c (116084) cgroup.c (163835)
1/*
2 * Copyright (c) 2003 Juli Mallett. All rights reserved.
3 *
4 * This software was written by Juli Mallett <jmallett@FreeBSD.org> for the
5 * FreeBSD project. Redistribution and use in source and binary forms, with
6 * or without modification, are permitted provided that the following
7 * conditions are met:
8 *

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

21 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2003 Juli Mallett. All rights reserved.
3 *
4 * This software was written by Juli Mallett <jmallett@FreeBSD.org> for the
5 * FreeBSD project. Redistribution and use in source and binary forms, with
6 * or without modification, are permitted provided that the following
7 * conditions are met:
8 *

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

21 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/lib/libufs/cgroup.c 116084 2003-06-09 09:32:29Z jmallett $");
29__FBSDID("$FreeBSD: head/lib/libufs/cgroup.c 163835 2006-10-31 21:21:48Z pjd $");
30
31#include <sys/param.h>
32#include <sys/mount.h>
33#include <sys/disklabel.h>
34#include <sys/stat.h>
35
36#include <ufs/ufs/ufsmount.h>
37#include <ufs/ufs/dinode.h>

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

66 if (bread(disk, fsbtodb(fs, cgtod(fs, c)), disk->d_cgunion.d_buf,
67 fs->fs_bsize) == -1) {
68 ERROR(disk, "unable to read cylinder group");
69 return (-1);
70 }
71 disk->d_lcg = c;
72 return (1);
73}
30
31#include <sys/param.h>
32#include <sys/mount.h>
33#include <sys/disklabel.h>
34#include <sys/stat.h>
35
36#include <ufs/ufs/ufsmount.h>
37#include <ufs/ufs/dinode.h>

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

66 if (bread(disk, fsbtodb(fs, cgtod(fs, c)), disk->d_cgunion.d_buf,
67 fs->fs_bsize) == -1) {
68 ERROR(disk, "unable to read cylinder group");
69 return (-1);
70 }
71 disk->d_lcg = c;
72 return (1);
73}
74
75int
76cgwrite1(struct uufsd *disk, int c)
77{
78 struct fs *fs;
79
80 fs = &disk->d_fs;
81 if (bwrite(disk, fsbtodb(fs, cgtod(fs, c)),
82 disk->d_cgunion.d_buf, fs->fs_bsize) == -1) {
83 ERROR(disk, "unable to write cylinder group");
84 return (-1);
85 }
86 return (0);
87}