Deleted Added
full compact
inode.c (116591) inode.c (207141)
1/*
2 * Copyright (c) 2002 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) 2002 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/inode.c 116591 2003-06-19 22:12:54Z mdodd $");
29__FBSDID("$FreeBSD: head/lib/libufs/inode.c 207141 2010-04-24 07:05:35Z jeff $");
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>

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

88 *dino = dp2;
89 return (0);
90 default:
91 break;
92 }
93 ERROR(disk, "unknown UFS filesystem type");
94 return (-1);
95}
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>

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

88 *dino = dp2;
89 return (0);
90 default:
91 break;
92 }
93 ERROR(disk, "unknown UFS filesystem type");
94 return (-1);
95}
96
97int
98putino(struct uufsd *disk)
99{
100 struct fs *fs;
101
102 fs = &disk->d_fs;
103 if (disk->d_inoblock == NULL) {
104 ERROR(disk, "No inode block allocated");
105 return (-1);
106 }
107 if (bwrite(disk, fsbtodb(fs, ino_to_fsba(&disk->d_fs, disk->d_inomin)),
108 disk->d_inoblock, disk->d_fs.fs_bsize) <= 0)
109 return (-1);
110 return (0);
111}