SOURCES: silo-git.patch (NEW) - fixes from silo git
tommat
tommat at pld-linux.org
Mon Oct 8 20:02:47 CEST 2007
Author: tommat Date: Mon Oct 8 18:02:47 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fixes from silo git
---- Files affected:
SOURCES:
silo-git.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/silo-git.patch
diff -u /dev/null SOURCES/silo-git.patch:1.1
--- /dev/null Mon Oct 8 20:02:47 2007
+++ SOURCES/silo-git.patch Mon Oct 8 20:02:42 2007
@@ -0,0 +1,1899 @@
+diff -Nur silo-1.4.13/Rules.make silo/Rules.make
+--- silo-1.4.13/Rules.make 2006-06-21 07:51:03.000000000 +0000
++++ silo/Rules.make 2007-10-08 17:39:27.959921000 +0000
+@@ -1,5 +1,6 @@
+ VERSION=1.4.13
+ IMGVERSION=0.99
++SHELL=/bin/bash
+ RM=rm -f
+ # We want to force 32-bit builds
+ CC=gcc -m32
+@@ -13,10 +14,17 @@
+ SMALL_RELOC=0x280000
+ LARGE_RELOC=0x380000
+
+-CFLAGS=-Os -Wall -I. -I../include -fomit-frame-pointer \
++cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
++ > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
++
++CFLAGS = -Os -Wall -I. -I../include -fomit-frame-pointer \
+ -fno-strict-aliasing -DSMALL_RELOC=$(SMALL_RELOC) \
+ -DLARGE_RELOC=$(LARGE_RELOC)
+
++ifeq ($(call cc-option-yn, -fno-stack-protector),y)
++CFLAGS += -fno-stack-protector
++endif
++
+ OPSYS=$(shell uname)
+ OSREV=$(shell uname -r)
+ ifeq ($(OPSYS),SunOS)
+diff -Nur silo-1.4.13/common/inflate.c silo/common/inflate.c
+--- silo-1.4.13/common/inflate.c 2006-06-01 17:24:53.000000000 +0000
++++ silo/common/inflate.c 2007-10-08 17:39:27.959921000 +0000
+@@ -958,13 +958,17 @@
+ if ((flags & RESERVED) != 0) {
+ error ("Input has invalid flags");
+ }
+- (ulg) get_byte (); /* Get timestamp */
+- (ulg) get_byte ();
+- (ulg) get_byte ();
+- (ulg) get_byte ();
+
+- (void) get_byte (); /* Ignore extra flags for the moment */
+- (void) get_byte (); /* Ignore OS type for the moment */
++ /* Ignore timestamp */
++ (void) get_byte ();
++ (void) get_byte ();
++ (void) get_byte ();
++ (void) get_byte ();
++
++ /* Ignore extra flags for the moment */
++ (void) get_byte ();
++ /* Ignore OS type for the moment */
++ (void) get_byte ();
+
+ if ((flags & EXTRA_FIELD) != 0) {
+ unsigned len = (unsigned) get_byte ();
+diff -Nur silo-1.4.13/first/Makefile silo/first/Makefile
+--- silo-1.4.13/first/Makefile 2006-06-01 17:24:53.000000000 +0000
++++ silo/first/Makefile 2007-10-08 17:39:27.963921250 +0000
+@@ -42,7 +42,7 @@
+
+ first.b: first
+ $(ELFTOAOUT) -o first.b first
+- echo -n 'SILO'$(IMGVERSION) | $(DD) of=first.b bs=8 conv=notrunc seek=3 count=1
++ printf 'SILO'$(IMGVERSION) | $(DD) of=first.b bs=8 conv=notrunc seek=3 count=1
+ $(DD) if=/dev/zero of=first.b bs=4 count=1 seek=127
+
+ ultra.o: ultra.S
+@@ -55,8 +55,8 @@
+
+ ultra.b: ultra
+ $(ELFTOAOUT) -o ultra.b ultra
+- echo -n 'SILO'$(IMGVERSION) | $(DD) of=ultra.b bs=8 conv=notrunc seek=3 count=1
+- echo -n -e '\340' | $(DD) of=ultra.b bs=1 count=1 seek=7 conv=notrunc
++ printf 'SILO'$(IMGVERSION) | $(DD) of=ultra.b bs=8 conv=notrunc seek=3 count=1
++ printf '\340' | $(DD) of=ultra.b bs=1 count=1 seek=7 conv=notrunc
+ $(DD) if=/dev/zero of=ultra.b bs=4 count=1 seek=127
+
+ generic.o: generic.S
+@@ -69,8 +69,8 @@
+
+ generic.b: generic
+ $(ELFTOAOUT) -o generic.b generic
+- echo -n 'SILO'$(IMGVERSION) | $(DD) of=generic.b bs=8 conv=notrunc seek=3 count=1
+- echo -n -e '\340' | $(DD) of=generic.b bs=1 count=1 seek=7 conv=notrunc
++ printf 'SILO'$(IMGVERSION) | $(DD) of=generic.b bs=8 conv=notrunc seek=3 count=1
++ printf '\340' | $(DD) of=generic.b bs=1 count=1 seek=7 conv=notrunc
+ $(DD) if=/dev/zero of=generic.b bs=4 count=1 seek=255
+
+ fd.o: fd.S
+@@ -83,8 +83,8 @@
+
+ fd.b: fd
+ $(ELFTOAOUT) -o fd.b fd
+- echo -n 'SILO'$(IMGVERSION) | $(DD) of=fd.b bs=8 conv=notrunc seek=3 count=1
+- echo -n -e '\340' | $(DD) of=fd.b bs=1 count=1 seek=7 conv=notrunc
++ printf 'SILO'$(IMGVERSION) | $(DD) of=fd.b bs=8 conv=notrunc seek=3 count=1
++ printf '\340' | $(DD) of=fd.b bs=1 count=1 seek=7 conv=notrunc
+ $(DD) if=/dev/zero of=fd.b bs=4 count=1 seek=255
+
+ ieee32.o: ieee32.S ieee32.h
+diff -Nur silo-1.4.13/first-isofs/isofs.c silo/first-isofs/isofs.c
+--- silo-1.4.13/first-isofs/isofs.c 2006-06-21 07:49:46.000000000 +0000
++++ silo/first-isofs/isofs.c 2007-10-08 17:39:27.963921250 +0000
+@@ -281,8 +281,9 @@
+
+ if (cd_read_block(cont_extent, 1, sect_buf) < 0)
+ return;
+- parse_rr(§_buf[cont_offset], §_buf[cont_offset +
+- cont_size - 3], name, symlink);
++ parse_rr((unsigned char *)(§_buf[cont_offset]),
++ (unsigned char *)(§_buf[cont_offset +
++ cont_size - 3]), name, symlink);
+ }
+ }
+
+@@ -330,7 +331,7 @@
+ rr++;
+
+ *symlink = 0;
+- parse_rr(rr, &buffer[i-3], namebuf, symlink);
++ parse_rr(rr, (unsigned char *)(&buffer[i-3]), namebuf, symlink);
+
+ if (idr->name_len[0] == 1 && !idr->name[0]) {
+ namebuf[0] = '.';
+@@ -466,7 +467,7 @@
+
+ prom_putchar(sinfo->id);
+
+- return dest;
++ return (char *)dest;
+ }
+
+
+diff -Nur silo-1.4.13/include/ext2fs/ext2fs.h silo/include/ext2fs/ext2fs.h
+--- silo-1.4.13/include/ext2fs/ext2fs.h 2006-06-01 17:24:53.000000000 +0000
++++ silo/include/ext2fs/ext2fs.h 2007-10-08 17:39:27.967921500 +0000
+@@ -868,6 +868,8 @@
+ extern int ext2fs_test_bb_dirty(ext2_filsys fs);
+ extern int ext2fs_group_of_blk(ext2_filsys fs, blk_t blk);
+ extern int ext2fs_group_of_ino(ext2_filsys fs, ino_t ino);
++extern blk_t ext2fs_inode_data_blocks(ext2_filsys fs,
++ struct ext2_inode *inode);
+
+ /*
+ * The actual inlined functions definitions themselves...
+diff -Nur silo-1.4.13/include/silo.h silo/include/silo.h
+--- silo-1.4.13/include/silo.h 2006-06-01 17:24:53.000000000 +0000
++++ silo/include/silo.h 2007-10-08 17:39:27.967921500 +0000
+@@ -94,7 +94,9 @@
+ void mark (void **);
+ void release (void *);
+ /* file.c */
+-int silo_load_file(char *, int, char *, char *, char *, int *, int, void (*)(int, char **, char **));
++int silo_load_file(char *, int, char *, unsigned char *,
++ unsigned char *, int *, int,
++ void (*)(int, char **, char **));
+ /* misc.c */
+ void silo_fatal(const char *);
+ char *silo_get_bootargs(int);
+diff -Nur silo-1.4.13/include/ufs/ufs_fs.h silo/include/ufs/ufs_fs.h
+--- silo-1.4.13/include/ufs/ufs_fs.h 1970-01-01 00:00:00.000000000 +0000
++++ silo/include/ufs/ufs_fs.h 2007-10-08 17:39:27.967921500 +0000
+@@ -0,0 +1,1018 @@
++/*
++ * linux/include/linux/ufs_fs.h
++ *
++ * Copyright (C) 1996
++ * Adrian Rodriguez (adrian at franklins-tower.rutgers.edu)
++ * Laboratory for Computer Science Research Computing Facility
++ * Rutgers, The State University of New Jersey
++ *
++ * Clean swab support by Fare <fare at tunes.org>
++ * just hope no one is using NNUUXXI on __?64 structure elements
++ * 64-bit clean thanks to Maciej W. Rozycki <macro at ds2.pg.gda.pl>
++ *
++ * 4.4BSD (FreeBSD) support added on February 1st 1998 by
++ * Niels Kristian Bech Jensen <nkbj at image.dk> partially based
++ * on code by Martin von Loewis <martin at mira.isdn.cs.tu-berlin.de>.
++ *
++ * NeXTstep support added on February 5th 1998 by
++ * Niels Kristian Bech Jensen <nkbj at image.dk>.
++ *
++ * Write support by Daniel Pirkl <daniel.pirkl at email.cz>
++ *
++ * HP/UX hfs filesystem support added by
++ * Martin K. Petersen <mkp at mkp.net>, August 1999
++ *
++ * UFS2 (of FreeBSD 5.x) support added by
++ * Niraj Kumar <niraj17 at iitbombay.org> , Jan 2004
++ *
++ */
++
++#ifndef __LINUX_UFS_FS_H
++#define __LINUX_UFS_FS_H
++
++#include <linux/types.h>
++#include <linux/kernel.h>
++#include <linux/stat.h>
++#include <linux/fs.h>
++
++#ifndef __KERNEL__
++typedef __u64 __fs64;
++typedef __u32 __fs32;
++typedef __u16 __fs16;
++#else
++typedef __u64 __bitwise __fs64;
++typedef __u32 __bitwise __fs32;
++typedef __u16 __bitwise __fs16;
++#endif
++
++#include <ufs/ufs_fs_i.h>
++#include <ufs/ufs_fs_sb.h>
++
++#define UFS_BBLOCK 0
++#define UFS_BBSIZE 8192
++#define UFS_SBLOCK 8192
++#define UFS_SBSIZE 8192
++
++#define UFS_SECTOR_SIZE 512
++#define UFS_SECTOR_BITS 9
++#define UFS_MAGIC 0x00011954
++#define UFS2_MAGIC 0x19540119
++#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
++
++/* Copied from FreeBSD */
++/*
++ * Each disk drive contains some number of filesystems.
++ * A filesystem consists of a number of cylinder groups.
++ * Each cylinder group has inodes and data.
++ *
++ * A filesystem is described by its super-block, which in turn
++ * describes the cylinder groups. The super-block is critical
++ * data and is replicated in each cylinder group to protect against
++ * catastrophic loss. This is done at `newfs' time and the critical
++ * super-block data does not change, so the copies need not be
++ * referenced further unless disaster strikes.
++ *
++ * For filesystem fs, the offsets of the various blocks of interest
++ * are given in the super block as:
++ * [fs->fs_sblkno] Super-block
++ * [fs->fs_cblkno] Cylinder group block
++ * [fs->fs_iblkno] Inode blocks
++ * [fs->fs_dblkno] Data blocks
++ * The beginning of cylinder group cg in fs, is given by
++ * the ``cgbase(fs, cg)'' macro.
++ *
++ * Depending on the architecture and the media, the superblock may
++ * reside in any one of four places. For tiny media where every block
++ * counts, it is placed at the very front of the partition. Historically,
++ * UFS1 placed it 8K from the front to leave room for the disk label and
++ * a small bootstrap. For UFS2 it got moved to 64K from the front to leave
++ * room for the disk label and a bigger bootstrap, and for really piggy
++ * systems we check at 256K from the front if the first three fail. In
++ * all cases the size of the superblock will be SBLOCKSIZE. All values are
++ * given in byte-offset form, so they do not imply a sector size. The
++ * SBLOCKSEARCH specifies the order in which the locations should be searched.
++ */
++#define SBLOCK_FLOPPY 0
++#define SBLOCK_UFS1 8192
++#define SBLOCK_UFS2 65536
++#define SBLOCK_PIGGY 262144
++#define SBLOCKSIZE 8192
++#define SBLOCKSEARCH \
++ { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 }
++
++
++/* HP specific MAGIC values */
++
++#define UFS_MAGIC_LFN 0x00095014 /* fs supports filenames > 14 chars */
++#define UFS_CIGAM_LFN 0x14500900 /* srahc 41 < semanelif stroppus sf */
++
++#define UFS_MAGIC_SEC 0x00612195 /* B1 security fs */
++#define UFS_CIGAM_SEC 0x95216100
++
++#define UFS_MAGIC_FEA 0x00195612 /* fs_featurebits supported */
++#define UFS_CIGAM_FEA 0x12561900
++
++#define UFS_MAGIC_4GB 0x05231994 /* fs > 4 GB && fs_featurebits */
++#define UFS_CIGAM_4GB 0x94192305
++
++/* Seems somebody at HP goofed here. B1 and lfs are both 0x2 !?! */
++#define UFS_FSF_LFN 0x00000001 /* long file names */
++#define UFS_FSF_B1 0x00000002 /* B1 security */
++#define UFS_FSF_LFS 0x00000002 /* large files */
++#define UFS_FSF_LUID 0x00000004 /* large UIDs */
++
++/* End of HP stuff */
++
++
++#define UFS_BSIZE 8192
++#define UFS_MINBSIZE 4096
++#define UFS_FSIZE 1024
++#define UFS_MAXFRAG (UFS_BSIZE / UFS_FSIZE)
++
++#define UFS_NDADDR 12
++#define UFS_NINDIR 3
++
++#define UFS_IND_BLOCK (UFS_NDADDR + 0)
++#define UFS_DIND_BLOCK (UFS_NDADDR + 1)
++#define UFS_TIND_BLOCK (UFS_NDADDR + 2)
++
++#define UFS_NDIR_FRAGMENT (UFS_NDADDR << uspi->s_fpbshift)
++#define UFS_IND_FRAGMENT (UFS_IND_BLOCK << uspi->s_fpbshift)
++#define UFS_DIND_FRAGMENT (UFS_DIND_BLOCK << uspi->s_fpbshift)
++#define UFS_TIND_FRAGMENT (UFS_TIND_BLOCK << uspi->s_fpbshift)
++
++#define UFS_ROOTINO 2
++#define UFS_FIRST_INO (UFS_ROOTINO + 1)
++
++#define UFS_USEEFT ((__u16)65535)
++
++#define UFS_FSOK 0x7c269d38
++#define UFS_FSACTIVE ((__s8)0x00)
++#define UFS_FSCLEAN ((__s8)0x01)
++#define UFS_FSSTABLE ((__s8)0x02)
++#define UFS_FSOSF1 ((__s8)0x03) /* is this correct for DEC OSF/1? */
++#define UFS_FSBAD ((__s8)0xff)
++
++/* From here to next blank line, s_flags for ufs_sb_info */
++/* directory entry encoding */
++#define UFS_DE_MASK 0x00000010 /* mask for the following */
++#define UFS_DE_OLD 0x00000000
++#define UFS_DE_44BSD 0x00000010
++/* uid encoding */
++#define UFS_UID_MASK 0x00000060 /* mask for the following */
++#define UFS_UID_OLD 0x00000000
++#define UFS_UID_44BSD 0x00000020
++#define UFS_UID_EFT 0x00000040
++/* superblock state encoding */
++#define UFS_ST_MASK 0x00000700 /* mask for the following */
++#define UFS_ST_OLD 0x00000000
++#define UFS_ST_44BSD 0x00000100
++#define UFS_ST_SUN 0x00000200
++#define UFS_ST_SUNx86 0x00000400
++/*cylinder group encoding */
++#define UFS_CG_MASK 0x00003000 /* mask for the following */
++#define UFS_CG_OLD 0x00000000
++#define UFS_CG_44BSD 0x00002000
++#define UFS_CG_SUN 0x00001000
++/* filesystem type encoding */
++#define UFS_TYPE_MASK 0x00010000 /* mask for the following */
++#define UFS_TYPE_UFS1 0x00000000
++#define UFS_TYPE_UFS2 0x00010000
++
++
++/* fs_inodefmt options */
++#define UFS_42INODEFMT -1
++#define UFS_44INODEFMT 2
++
++/* mount options */
++#define UFS_MOUNT_ONERROR 0x0000000F
++#define UFS_MOUNT_ONERROR_PANIC 0x00000001
++#define UFS_MOUNT_ONERROR_LOCK 0x00000002
++#define UFS_MOUNT_ONERROR_UMOUNT 0x00000004
++#define UFS_MOUNT_ONERROR_REPAIR 0x00000008
++
++#define UFS_MOUNT_UFSTYPE 0x0000FFF0
++#define UFS_MOUNT_UFSTYPE_OLD 0x00000010
++#define UFS_MOUNT_UFSTYPE_44BSD 0x00000020
++#define UFS_MOUNT_UFSTYPE_SUN 0x00000040
++#define UFS_MOUNT_UFSTYPE_NEXTSTEP 0x00000080
++#define UFS_MOUNT_UFSTYPE_NEXTSTEP_CD 0x00000100
++#define UFS_MOUNT_UFSTYPE_OPENSTEP 0x00000200
++#define UFS_MOUNT_UFSTYPE_SUNx86 0x00000400
++#define UFS_MOUNT_UFSTYPE_HP 0x00000800
++#define UFS_MOUNT_UFSTYPE_UFS2 0x00001000
++
++#define ufs_clear_opt(o,opt) o &= ~UFS_MOUNT_##opt
++#define ufs_set_opt(o,opt) o |= UFS_MOUNT_##opt
++#define ufs_test_opt(o,opt) ((o) & UFS_MOUNT_##opt)
++
++/*
++ * MINFREE gives the minimum acceptable percentage of file system
++ * blocks which may be free. If the freelist drops below this level
++ * only the superuser may continue to allocate blocks. This may
++ * be set to 0 if no reserve of free blocks is deemed necessary,
++ * however throughput drops by fifty percent if the file system
++ * is run at between 95% and 100% full; thus the minimum default
++ * value of fs_minfree is 5%. However, to get good clustering
++ * performance, 10% is a better choice. hence we use 10% as our
++ * default value. With 10% free space, fragmentation is not a
++ * problem, so we choose to optimize for time.
++ */
++#define UFS_MINFREE 5
++#define UFS_DEFAULTOPT UFS_OPTTIME
++
++/*
++ * Debug code
++ */
++#ifdef CONFIG_UFS_DEBUG
++# define UFSD(f, a...) { \
++ printk ("UFSD (%s, %d): %s:", \
++ __FILE__, __LINE__, __FUNCTION__); \
++ printk (f, ## a); \
++ }
++#else
++# define UFSD(f, a...) /**/
++#endif
++
++/*
++ * Turn file system block numbers into disk block addresses.
++ * This maps file system blocks to device size blocks.
++ */
++#define ufs_fsbtodb(uspi, b) ((b) << (uspi)->s_fsbtodb)
++#define ufs_dbtofsb(uspi, b) ((b) >> (uspi)->s_fsbtodb)
++
++/*
++ * Cylinder group macros to locate things in cylinder groups.
++ * They calc file system addresses of cylinder group data structures.
++ */
++#define ufs_cgbase(c) (uspi->s_fpg * (c))
++#define ufs_cgstart(c) ((uspi)->fs_magic == UFS2_MAGIC ? ufs_cgbase(c) : \
++ (ufs_cgbase(c) + uspi->s_cgoffset * ((c) & ~uspi->s_cgmask)))
++#define ufs_cgsblock(c) (ufs_cgstart(c) + uspi->s_sblkno) /* super blk */
++#define ufs_cgcmin(c) (ufs_cgstart(c) + uspi->s_cblkno) /* cg block */
++#define ufs_cgimin(c) (ufs_cgstart(c) + uspi->s_iblkno) /* inode blk */
++#define ufs_cgdmin(c) (ufs_cgstart(c) + uspi->s_dblkno) /* 1st data */
++
++/*
++ * Macros for handling inode numbers:
++ * inode number to file system block offset.
++ * inode number to cylinder group number.
++ * inode number to file system block address.
++ */
++#define ufs_inotocg(x) ((x) / uspi->s_ipg)
++#define ufs_inotocgoff(x) ((x) % uspi->s_ipg)
++#define ufs_inotofsba(x) (ufs_cgimin(ufs_inotocg(x)) + ufs_inotocgoff(x) / uspi->s_inopf)
++#define ufs_inotofsbo(x) ((x) % uspi->s_inopf)
++
++/*
++ * Give cylinder group number for a file system block.
++ * Give cylinder group block number for a file system block.
++ */
++#define ufs_dtog(d) ((d) / uspi->s_fpg)
++#define ufs_dtogd(d) ((d) % uspi->s_fpg)
++
++/*
++ * Compute the cylinder and rotational position of a cyl block addr.
++ */
++#define ufs_cbtocylno(bno) \
++ ((bno) * uspi->s_nspf / uspi->s_spc)
++#define ufs_cbtorpos(bno) \
++ ((((bno) * uspi->s_nspf % uspi->s_spc / uspi->s_nsect \
++ * uspi->s_trackskew + (bno) * uspi->s_nspf % uspi->s_spc \
++ % uspi->s_nsect * uspi->s_interleave) % uspi->s_nsect \
++ * uspi->s_nrpos) / uspi->s_npsect)
++
++/*
++ * The following macros optimize certain frequently calculated
++ * quantities by using shifts and masks in place of divisions
++ * modulos and multiplications.
++ */
++#define ufs_blkoff(loc) ((loc) & uspi->s_qbmask)
++#define ufs_fragoff(loc) ((loc) & uspi->s_qfmask)
++#define ufs_lblktosize(blk) ((blk) << uspi->s_bshift)
++#define ufs_lblkno(loc) ((loc) >> uspi->s_bshift)
++#define ufs_numfrags(loc) ((loc) >> uspi->s_fshift)
++#define ufs_blkroundup(size) (((size) + uspi->s_qbmask) & uspi->s_bmask)
++#define ufs_fragroundup(size) (((size) + uspi->s_qfmask) & uspi->s_fmask)
++#define ufs_fragstoblks(frags) ((frags) >> uspi->s_fpbshift)
++#define ufs_blkstofrags(blks) ((blks) << uspi->s_fpbshift)
++#define ufs_fragnum(fsb) ((fsb) & uspi->s_fpbmask)
++#define ufs_blknum(fsb) ((fsb) & ~uspi->s_fpbmask)
++
++#define UFS_MAXNAMLEN 255
++#define UFS_MAXMNTLEN 512
++#define UFS2_MAXMNTLEN 468
++#define UFS2_MAXVOLLEN 32
++/* #define UFS_MAXCSBUFS 31 */
++#define UFS_LINK_MAX 32000
++/*
++#define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4)
++*/
++#define UFS2_NOCSPTRS 28
++
++/*
++ * UFS_DIR_PAD defines the directory entries boundaries
++ * (must be a multiple of 4)
++ */
++#define UFS_DIR_PAD 4
++#define UFS_DIR_ROUND (UFS_DIR_PAD - 1)
++#define UFS_DIR_REC_LEN(name_len) (((name_len) + 1 + 8 + UFS_DIR_ROUND) & ~UFS_DIR_ROUND)
++
++struct ufs_timeval {
++ __fs32 tv_sec;
++ __fs32 tv_usec;
++};
++
++struct ufs_dir_entry {
++ __fs32 d_ino; /* inode number of this entry */
++ __fs16 d_reclen; /* length of this entry */
++ union {
++ __fs16 d_namlen; /* actual length of d_name */
++ struct {
++ __u8 d_type; /* file type */
++ __u8 d_namlen; /* length of string in d_name */
++ } d_44;
++ } d_u;
++ __u8 d_name[UFS_MAXNAMLEN + 1]; /* file name */
++};
++
++struct ufs_csum {
++ __fs32 cs_ndir; /* number of directories */
++ __fs32 cs_nbfree; /* number of free blocks */
++ __fs32 cs_nifree; /* number of free inodes */
++ __fs32 cs_nffree; /* number of free frags */
++};
++struct ufs2_csum_total {
++ __fs64 cs_ndir; /* number of directories */
++ __fs64 cs_nbfree; /* number of free blocks */
++ __fs64 cs_nifree; /* number of free inodes */
++ __fs64 cs_nffree; /* number of free frags */
++ __fs64 cs_numclusters; /* number of free clusters */
++ __fs64 cs_spare[3]; /* future expansion */
++};
++
++struct ufs_csum_core {
++ __u64 cs_ndir; /* number of directories */
++ __u64 cs_nbfree; /* number of free blocks */
++ __u64 cs_nifree; /* number of free inodes */
++ __u64 cs_nffree; /* number of free frags */
++ __u64 cs_numclusters; /* number of free clusters */
++};
++
++/*
++ * File system flags
++ */
++#define UFS_UNCLEAN 0x01 /* file system not clean at mount (unused) */
++#define UFS_DOSOFTDEP 0x02 /* file system using soft dependencies */
++#define UFS_NEEDSFSCK 0x04 /* needs sync fsck (FreeBSD compat, unused) */
++#define UFS_INDEXDIRS 0x08 /* kernel supports indexed directories */
++#define UFS_ACLS 0x10 /* file system has ACLs enabled */
++#define UFS_MULTILABEL 0x20 /* file system is MAC multi-label */
++#define UFS_FLAGS_UPDATED 0x80 /* flags have been moved to new location */
++
++#if 0
++/*
++ * This is the actual superblock, as it is laid out on the disk.
++ * Do NOT use this structure, because of sizeof(ufs_super_block) > 512 and
++ * it may occupy several blocks, use
++ * struct ufs_super_block_(first,second,third) instead.
++ */
++struct ufs_super_block {
++ __fs32 fs_link; /* UNUSED */
++ __fs32 fs_rlink; /* UNUSED */
++ __fs32 fs_sblkno; /* addr of super-block in filesys */
++ __fs32 fs_cblkno; /* offset of cyl-block in filesys */
++ __fs32 fs_iblkno; /* offset of inode-blocks in filesys */
++ __fs32 fs_dblkno; /* offset of first data after cg */
++ __fs32 fs_cgoffset; /* cylinder group offset in cylinder */
++ __fs32 fs_cgmask; /* used to calc mod fs_ntrak */
++ __fs32 fs_time; /* last time written -- time_t */
++ __fs32 fs_size; /* number of blocks in fs */
++ __fs32 fs_dsize; /* number of data blocks in fs */
++ __fs32 fs_ncg; /* number of cylinder groups */
++ __fs32 fs_bsize; /* size of basic blocks in fs */
++ __fs32 fs_fsize; /* size of frag blocks in fs */
++ __fs32 fs_frag; /* number of frags in a block in fs */
++/* these are configuration parameters */
++ __fs32 fs_minfree; /* minimum percentage of free blocks */
++ __fs32 fs_rotdelay; /* num of ms for optimal next block */
++ __fs32 fs_rps; /* disk revolutions per second */
++/* these fields can be computed from the others */
++ __fs32 fs_bmask; /* ``blkoff'' calc of blk offsets */
++ __fs32 fs_fmask; /* ``fragoff'' calc of frag offsets */
++ __fs32 fs_bshift; /* ``lblkno'' calc of logical blkno */
++ __fs32 fs_fshift; /* ``numfrags'' calc number of frags */
++/* these are configuration parameters */
++ __fs32 fs_maxcontig; /* max number of contiguous blks */
++ __fs32 fs_maxbpg; /* max number of blks per cyl group */
++/* these fields can be computed from the others */
++ __fs32 fs_fragshift; /* block to frag shift */
++ __fs32 fs_fsbtodb; /* fsbtodb and dbtofsb shift constant */
++ __fs32 fs_sbsize; /* actual size of super block */
++ __fs32 fs_csmask; /* csum block offset */
++ __fs32 fs_csshift; /* csum block number */
++ __fs32 fs_nindir; /* value of NINDIR */
++ __fs32 fs_inopb; /* value of INOPB */
++ __fs32 fs_nspf; /* value of NSPF */
++/* yet another configuration parameter */
++ __fs32 fs_optim; /* optimization preference, see below */
++/* these fields are derived from the hardware */
++ union {
++ struct {
++ __fs32 fs_npsect; /* # sectors/track including spares */
++ } fs_sun;
++ struct {
++ __fs32 fs_state; /* file system state time stamp */
++ } fs_sunx86;
++ } fs_u1;
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list