From a3257f3c6f3db7d278126e22636051f03ba3baec Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Thu, 9 May 1991 02:29:32 -0800 Subject: [PATCH] make comments more precise SCCS-vsn: sys/ufs/ffs/dinode.h 7.10 SCCS-vsn: sys/ufs/ufs/dinode.h 7.10 SCCS-vsn: sys/ufs/ffs/ffs_balloc.c 7.13 SCCS-vsn: sys/ufs/lfs/lfs_balloc.c 7.13 --- usr/src/sys/ufs/ffs/dinode.h | 27 ++++++++++++++------------- usr/src/sys/ufs/ffs/ffs_balloc.c | 9 +++++---- usr/src/sys/ufs/lfs/lfs_balloc.c | 9 +++++---- usr/src/sys/ufs/ufs/dinode.h | 27 ++++++++++++++------------- 4 files changed, 38 insertions(+), 34 deletions(-) diff --git a/usr/src/sys/ufs/ffs/dinode.h b/usr/src/sys/ufs/ffs/dinode.h index 2ee1932e0a..cac5ee2ba8 100644 --- a/usr/src/sys/ufs/ffs/dinode.h +++ b/usr/src/sys/ufs/ffs/dinode.h @@ -4,11 +4,12 @@ * * %sccs.include.redist.c% * - * @(#)dinode.h 7.9 (Berkeley) %G% + * @(#)dinode.h 7.10 (Berkeley) %G% */ /* - * This structure defines the on-disk format of an inode. + * A dinode contains all the meta-data associated with a UFS file. + * This structure defines the on-disk format of a dinode. */ #define NDADDR 12 /* direct addresses in inode */ @@ -42,18 +43,18 @@ struct dinode { #define di_rdev di_db[0] /* file modes */ -#define IFMT 0170000 /* type of file */ +#define IFMT 0170000 /* mask of file type */ #define IFIFO 0010000 /* named pipe (fifo) */ -#define IFCHR 0020000 /* character special */ +#define IFCHR 0020000 /* character special device */ #define IFDIR 0040000 /* directory */ -#define IFBLK 0060000 /* block special */ -#define IFREG 0100000 /* regular */ +#define IFBLK 0060000 /* block special device */ +#define IFREG 0100000 /* regular file */ #define IFLNK 0120000 /* symbolic link */ -#define IFSOCK 0140000 /* socket */ +#define IFSOCK 0140000 /* UNIX domain socket */ -#define ISUID 04000 /* set user id on execution */ -#define ISGID 02000 /* set group id on execution */ -#define ISVTX 01000 /* save swapped text even after use */ -#define IREAD 0400 /* read, write, execute permissions */ -#define IWRITE 0200 -#define IEXEC 0100 +#define ISUID 04000 /* set user identifier when exec'ing */ +#define ISGID 02000 /* set group identifier when exec'ing */ +#define ISVTX 01000 /* save execution information on exit */ +#define IREAD 0400 /* read permission */ +#define IWRITE 0200 /* write permission */ +#define IEXEC 0100 /* execute permission */ diff --git a/usr/src/sys/ufs/ffs/ffs_balloc.c b/usr/src/sys/ufs/ffs/ffs_balloc.c index 914483ead5..a6393dbe04 100644 --- a/usr/src/sys/ufs/ffs/ffs_balloc.c +++ b/usr/src/sys/ufs/ffs/ffs_balloc.c @@ -4,7 +4,7 @@ * * %sccs.include.redist.c% * - * @(#)ffs_balloc.c 7.12 (Berkeley) %G% + * @(#)ffs_balloc.c 7.13 (Berkeley) %G% */ #include "param.h" @@ -19,9 +19,10 @@ #include "fs.h" /* - * Bmap defines the structure of file system storage - * by returning the physical block number on a device - * given the inode and the logical block number in a file. + * Bmap converts a the logical block number of a file + * to its physical block number on the disk. The conversion + * is done by using the logical block number to index into + * the array of block pointers described by the dinode. */ bmap(ip, bn, bnp) register struct inode *ip; diff --git a/usr/src/sys/ufs/lfs/lfs_balloc.c b/usr/src/sys/ufs/lfs/lfs_balloc.c index 2af6341456..8954954962 100644 --- a/usr/src/sys/ufs/lfs/lfs_balloc.c +++ b/usr/src/sys/ufs/lfs/lfs_balloc.c @@ -4,7 +4,7 @@ * * %sccs.include.redist.c% * - * @(#)lfs_balloc.c 7.12 (Berkeley) %G% + * @(#)lfs_balloc.c 7.13 (Berkeley) %G% */ #include "param.h" @@ -19,9 +19,10 @@ #include "fs.h" /* - * Bmap defines the structure of file system storage - * by returning the physical block number on a device - * given the inode and the logical block number in a file. + * Bmap converts a the logical block number of a file + * to its physical block number on the disk. The conversion + * is done by using the logical block number to index into + * the array of block pointers described by the dinode. */ bmap(ip, bn, bnp) register struct inode *ip; diff --git a/usr/src/sys/ufs/ufs/dinode.h b/usr/src/sys/ufs/ufs/dinode.h index 2ee1932e0a..cac5ee2ba8 100644 --- a/usr/src/sys/ufs/ufs/dinode.h +++ b/usr/src/sys/ufs/ufs/dinode.h @@ -4,11 +4,12 @@ * * %sccs.include.redist.c% * - * @(#)dinode.h 7.9 (Berkeley) %G% + * @(#)dinode.h 7.10 (Berkeley) %G% */ /* - * This structure defines the on-disk format of an inode. + * A dinode contains all the meta-data associated with a UFS file. + * This structure defines the on-disk format of a dinode. */ #define NDADDR 12 /* direct addresses in inode */ @@ -42,18 +43,18 @@ struct dinode { #define di_rdev di_db[0] /* file modes */ -#define IFMT 0170000 /* type of file */ +#define IFMT 0170000 /* mask of file type */ #define IFIFO 0010000 /* named pipe (fifo) */ -#define IFCHR 0020000 /* character special */ +#define IFCHR 0020000 /* character special device */ #define IFDIR 0040000 /* directory */ -#define IFBLK 0060000 /* block special */ -#define IFREG 0100000 /* regular */ +#define IFBLK 0060000 /* block special device */ +#define IFREG 0100000 /* regular file */ #define IFLNK 0120000 /* symbolic link */ -#define IFSOCK 0140000 /* socket */ +#define IFSOCK 0140000 /* UNIX domain socket */ -#define ISUID 04000 /* set user id on execution */ -#define ISGID 02000 /* set group id on execution */ -#define ISVTX 01000 /* save swapped text even after use */ -#define IREAD 0400 /* read, write, execute permissions */ -#define IWRITE 0200 -#define IEXEC 0100 +#define ISUID 04000 /* set user identifier when exec'ing */ +#define ISGID 02000 /* set group identifier when exec'ing */ +#define ISVTX 01000 /* save execution information on exit */ +#define IREAD 0400 /* read permission */ +#define IWRITE 0200 /* write permission */ +#define IEXEC 0100 /* execute permission */ -- 2.20.1