From 2059697c29c926c3ad42efb61993baf2723f0b0e Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Thu, 3 Apr 1997 23:28:32 +0000 Subject: Initial Revision --- serverboot/disk_inode_ffs.h | 99 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 serverboot/disk_inode_ffs.h (limited to 'serverboot/disk_inode_ffs.h') diff --git a/serverboot/disk_inode_ffs.h b/serverboot/disk_inode_ffs.h new file mode 100644 index 00000000..43690b2f --- /dev/null +++ b/serverboot/disk_inode_ffs.h @@ -0,0 +1,99 @@ +/* + * Mach Operating System + * Copyright (c) 1991,1990 Carnegie Mellon University + * All Rights Reserved. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to + * + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 + * + * any improvements or extensions that they make and grant Carnegie Mellon + * the rights to redistribute these changes. + */ +/* + * Copyright (c) 1982, 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)inode.h 7.5 (Berkeley) 7/3/89 + */ + +#ifndef _BOOT_UFS_DISK_INODE_FFS_H_ +#define _BOOT_UFS_DISK_INODE_FFS_H_ + +#define NDADDR FFS_NDADDR +#define NIADDR FFS_NIADDR + +#define MAX_FASTLINK_SIZE FFS_MAX_FASTLINK_SIZE + +#define IC_FASTLINK 0x0001 /* Symbolic link in inode */ + +#define i_mode i_ic.ic_mode +#define i_nlink i_ic.ic_nlink +#define i_uid i_ic.ic_uid +#define i_gid i_ic.ic_gid +#if BYTE_MSF +#define i_size i_ic.ic_size.val[1] +#else /* BYTE_LSF */ +#define i_size i_ic.ic_size.val[0] +#endif +#define i_db i_ic.ic_db +#define i_ib i_ic.ic_ib +#define i_atime i_ic.ic_atime +#define i_mtime i_ic.ic_mtime +#define i_ctime i_ic.ic_ctime +#define i_blocks i_ic.ic_blocks +#define i_rdev i_ic.ic_db[0] +#define i_symlink i_ic.ic_symlink +#define i_flags i_ic.ic_flags +#define i_gen i_ic.ic_gen + +/* modes */ +#define IFMT 0xf000 /* type of file */ +#define IFCHR 0x2000 /* character special */ +#define IFDIR 0x4000 /* directory */ +#define IFBLK 0x6000 /* block special */ +#define IFREG 0x8000 /* regular */ +#define IFLNK 0xa000 /* symbolic link */ +#define IFSOCK 0xc000 /* socket */ + + +#define ISUID 0x0800 /* set user id on execution */ +#define ISGID 0x0400 /* set group id on execution */ +#define ISVTX 0x0200 /* save swapped text even after use */ +#define IREAD 0x0100 /* read, write, execute permissions */ +#define IWRITE 0x0080 +#define IEXEC 0x0040 + +#define f_fs u.ffs.ffs_fs +#define i_ic u.ffs.ffs_ic +#define f_nindir u.ffs.ffs_nindir +#define f_blk u.ffs.ffs_blk +#define f_blksize u.ffs.ffs_blksize +#define f_blkno u.ffs.ffs_blkno + +#endif _BOOT_UFS_DISK_INODE_FFS_H_ -- cgit v1.2.3 From 84891ea2b1e3af8d2e7e9ee029f1010e0734b0a2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 21 Jul 2001 05:19:15 +0000 Subject: 2001-07-20 Roland McGrath * panic.c: Fix obsolescent #endif syntax. * ext2_file_io.c: Likewise. * disk_inode_ffs.h: Likewise. * ffs_file_io.c: Likewise. --- serverboot/disk_inode_ffs.h | 14 +++++++------- serverboot/ext2_file_io.c | 2 +- serverboot/ffs_file_io.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'serverboot/disk_inode_ffs.h') diff --git a/serverboot/disk_inode_ffs.h b/serverboot/disk_inode_ffs.h index 43690b2f..ab352f84 100644 --- a/serverboot/disk_inode_ffs.h +++ b/serverboot/disk_inode_ffs.h @@ -1,25 +1,25 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ @@ -96,4 +96,4 @@ #define f_blksize u.ffs.ffs_blksize #define f_blkno u.ffs.ffs_blkno -#endif _BOOT_UFS_DISK_INODE_FFS_H_ +#endif /* _BOOT_UFS_DISK_INODE_FFS_H_ */ diff --git a/serverboot/ext2_file_io.c b/serverboot/ext2_file_io.c index 28ee2cb3..cb915c4a 100644 --- a/serverboot/ext2_file_io.c +++ b/serverboot/ext2_file_io.c @@ -658,7 +658,7 @@ ext2_open_file(master_device_port, path, fp) bcopy(fp->i_ic.i_block, namebuf, (unsigned) link_len); } else -#endif IC_FASTLINK +#endif /* IC_FASTLINK */ { /* * Read file for symbolic link diff --git a/serverboot/ffs_file_io.c b/serverboot/ffs_file_io.c index 0055c302..1105eacc 100644 --- a/serverboot/ffs_file_io.c +++ b/serverboot/ffs_file_io.c @@ -632,7 +632,7 @@ ffs_open_file(master_device_port, path, fp) bcopy(fp->i_symlink, namebuf, (unsigned) link_len); } else -#endif IC_FASTLINK +#endif /* IC_FASTLINK */ #if !defined(DISABLE_BSD44_FASTLINKS) /* * There is no bit for fastlinks in 4.4 but instead -- cgit v1.2.3