From b5cc7ac79d408dd79c93b30ca4fd0e188d39bb09 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Mon, 11 Nov 1991 19:27:23 -0800 Subject: [PATCH] move ROOTINO here, so applications don't have to include ufsmount.h SCCS-vsn: sys/ufs/ffs/dinode.h 7.12 SCCS-vsn: sys/ufs/ufs/dinode.h 7.12 --- usr/src/sys/ufs/ffs/dinode.h | 10 +++++++++- usr/src/sys/ufs/ufs/dinode.h | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/usr/src/sys/ufs/ffs/dinode.h b/usr/src/sys/ufs/ffs/dinode.h index 371dbf0324..9dec869c55 100644 --- a/usr/src/sys/ufs/ffs/dinode.h +++ b/usr/src/sys/ufs/ffs/dinode.h @@ -4,9 +4,17 @@ * * %sccs.include.redist.c% * - * @(#)dinode.h 7.11 (Berkeley) %G% + * @(#)dinode.h 7.12 (Berkeley) %G% */ +/* + * The root inode is the root of the file system. Inode 0 can't be used for + * normal purposes and historically bad blocks were linked to inode 1, thus + * the root inode is 2. (Inode 1 is no longer used for this purpose, however + * numerous dump tapes make this assumption, so we are stuck with it). + */ +#define ROOTINO ((ino_t)2) + /* * A dinode contains all the meta-data associated with a UFS file. * This structure defines the on-disk format of a dinode. diff --git a/usr/src/sys/ufs/ufs/dinode.h b/usr/src/sys/ufs/ufs/dinode.h index 371dbf0324..9dec869c55 100644 --- a/usr/src/sys/ufs/ufs/dinode.h +++ b/usr/src/sys/ufs/ufs/dinode.h @@ -4,9 +4,17 @@ * * %sccs.include.redist.c% * - * @(#)dinode.h 7.11 (Berkeley) %G% + * @(#)dinode.h 7.12 (Berkeley) %G% */ +/* + * The root inode is the root of the file system. Inode 0 can't be used for + * normal purposes and historically bad blocks were linked to inode 1, thus + * the root inode is 2. (Inode 1 is no longer used for this purpose, however + * numerous dump tapes make this assumption, so we are stuck with it). + */ +#define ROOTINO ((ino_t)2) + /* * A dinode contains all the meta-data associated with a UFS file. * This structure defines the on-disk format of a dinode. -- 2.20.1