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 $");
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}
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 $");
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}