[Glibc-bsd-commits] r1880 - in trunk/ufsutils/debian: . patches
Petr Salinger
ps-guest at alioth.debian.org
Thu Jan 18 13:34:26 UTC 2007
Author: ps-guest
Date: 2007-01-18 14:34:26 +0100 (Thu, 18 Jan 2007)
New Revision: 1880
Added:
trunk/ufsutils/debian/patches/00_mount.patch
trunk/ufsutils/debian/patches/00_param.patch
trunk/ufsutils/debian/patches/03_ufsmount.patch
Removed:
trunk/ufsutils/debian/patches/03_mkfs.ufs_operator_gid.patch
Modified:
trunk/ufsutils/debian/patches/00_libport.patch
trunk/ufsutils/debian/patches/02_fsck.ufs.patch
trunk/ufsutils/debian/patches/02_fsdb.ufs.patch
trunk/ufsutils/debian/patches/02_growfs.ufs.patch
trunk/ufsutils/debian/upstream.sh
Log:
* newer ufsutils, can be compiled on Linux/i386 - sarge - gcc-3.3
not yet tested on kfreebsd-i386 with gcc-4.1
Modified: trunk/ufsutils/debian/patches/00_libport.patch
===================================================================
--- trunk/ufsutils/debian/patches/00_libport.patch 2007-01-18 12:19:28 UTC (rev 1879)
+++ trunk/ufsutils/debian/patches/00_libport.patch 2007-01-18 13:34:26 UTC (rev 1880)
@@ -59,562 +59,6 @@
/*
* Disk description table, see disktab(5)
-diff -Naur ufsutils.orig/include/sys/mount.h ufsutils.new/include/sys/mount.h
---- ufsutils.orig/include/sys/mount.h 2004-06-19 06:07:57.000000000 +0200
-+++ ufsutils.new/include/sys/mount.h 2004-06-28 23:40:16.000000000 +0200
-@@ -34,14 +34,10 @@
- #define _SYS_MOUNT_H_
-
- #include <sys/ucred.h>
--#include <sys/queue.h>
--#ifdef _KERNEL
--#include <sys/lockmgr.h>
--#include <sys/_lock.h>
--#include <sys/_mutex.h>
--#endif
-+#include <stdint.h>
-+#include <sys/types.h>
-+#include <sys/socket.h>
-
--typedef struct fsid { int32_t val[2]; } fsid_t; /* filesystem id type */
-
- /*
- * File identifier.
-@@ -60,116 +56,6 @@
- */
- #define MFSNAMELEN 16 /* length of type name including null */
- #define MNAMELEN 88 /* size of on/from name bufs */
--#define STATFS_VERSION 0x20030518 /* current version number */
--struct statfs {
-- uint32_t f_version; /* structure version number */
-- uint32_t f_type; /* type of filesystem */
-- uint64_t f_flags; /* copy of mount exported flags */
-- uint64_t f_bsize; /* filesystem fragment size */
-- uint64_t f_iosize; /* optimal transfer block size */
-- uint64_t f_blocks; /* total data blocks in filesystem */
-- uint64_t f_bfree; /* free blocks in filesystem */
-- int64_t f_bavail; /* free blocks avail to non-superuser */
-- uint64_t f_files; /* total file nodes in filesystem */
-- int64_t f_ffree; /* free nodes avail to non-superuser */
-- uint64_t f_syncwrites; /* count of sync writes since mount */
-- uint64_t f_asyncwrites; /* count of async writes since mount */
-- uint64_t f_syncreads; /* count of sync reads since mount */
-- uint64_t f_asyncreads; /* count of async reads since mount */
-- uint64_t f_spare[10]; /* unused spare */
-- uint32_t f_namemax; /* maximum filename length */
-- uid_t f_owner; /* user that mounted the filesystem */
-- fsid_t f_fsid; /* filesystem id */
-- char f_charspare[80]; /* spare string space */
-- char f_fstypename[MFSNAMELEN]; /* filesystem type name */
-- char f_mntfromname[MNAMELEN]; /* mounted filesystem */
-- char f_mntonname[MNAMELEN]; /* directory on which mounted */
--};
--
--#ifdef _KERNEL
--#define OMFSNAMELEN 16 /* length of fs type name, including null */
--#define OMNAMELEN (88 - 2 * sizeof(long)) /* size of on/from name bufs */
--
--/* XXX getfsstat.2 is out of date with write and read counter changes here. */
--/* XXX statfs.2 is out of date with read counter changes here. */
--struct ostatfs {
-- long f_spare2; /* placeholder */
-- long f_bsize; /* fundamental filesystem block size */
-- long f_iosize; /* optimal transfer block size */
-- long f_blocks; /* total data blocks in filesystem */
-- long f_bfree; /* free blocks in fs */
-- long f_bavail; /* free blocks avail to non-superuser */
-- long f_files; /* total file nodes in filesystem */
-- long f_ffree; /* free file nodes in fs */
-- fsid_t f_fsid; /* filesystem id */
-- uid_t f_owner; /* user that mounted the filesystem */
-- int f_type; /* type of filesystem */
-- int f_flags; /* copy of mount exported flags */
-- long f_syncwrites; /* count of sync writes since mount */
-- long f_asyncwrites; /* count of async writes since mount */
-- char f_fstypename[OMFSNAMELEN]; /* fs type name */
-- char f_mntonname[OMNAMELEN]; /* directory on which mounted */
-- long f_syncreads; /* count of sync reads since mount */
-- long f_asyncreads; /* count of async reads since mount */
-- short f_spares1; /* unused spare */
-- char f_mntfromname[OMNAMELEN];/* mounted filesystem */
-- short f_spares2; /* unused spare */
-- /*
-- * XXX on machines where longs are aligned to 8-byte boundaries, there
-- * is an unnamed int32_t here. This spare was after the apparent end
-- * of the struct until we bit off the read counters from f_mntonname.
-- */
-- long f_spare[2]; /* unused spare */
--};
--
--#define MMAXOPTIONLEN 65536 /* maximum length of a mount option */
--
--TAILQ_HEAD(vnodelst, vnode);
--TAILQ_HEAD(vfsoptlist, vfsopt);
--struct vfsopt {
-- TAILQ_ENTRY(vfsopt) link;
-- char *name;
-- void *value;
-- int len;
--};
--
--/*
-- * Structure per mounted filesystem. Each mounted filesystem has an
-- * array of operations and an instance record. The filesystems are
-- * put on a doubly linked list.
-- *
-- */
--struct mount {
-- TAILQ_ENTRY(mount) mnt_list; /* mount list */
-- struct vfsops *mnt_op; /* operations on fs */
-- struct vfsconf *mnt_vfc; /* configuration info */
-- struct vnode *mnt_vnodecovered; /* vnode we mounted on */
-- struct vnode *mnt_syncer; /* syncer vnode */
-- struct vnodelst mnt_nvnodelist; /* list of vnodes this mount */
-- struct lock mnt_lock; /* mount structure lock */
-- struct mtx mnt_mtx; /* mount structure interlock */
-- int mnt_writeopcount; /* write syscalls in progress */
-- int mnt_flag; /* flags shared with user */
-- struct vfsoptlist *mnt_opt; /* current mount options */
-- struct vfsoptlist *mnt_optnew; /* new options passed to fs */
-- int mnt_kern_flag; /* kernel only flags */
-- int mnt_maxsymlinklen; /* max size of short symlink */
-- struct statfs mnt_stat; /* cache of filesystem stats */
-- struct ucred *mnt_cred; /* credentials of mounter */
-- qaddr_t mnt_data; /* private data */
-- time_t mnt_time; /* last time written*/
-- int mnt_iosize_max; /* max size for clusters, etc */
-- struct netexport *mnt_export; /* export list */
-- struct label *mnt_mntlabel; /* MAC label for the mount */
-- struct label *mnt_fslabel; /* MAC label for the fs */
-- int mnt_nvnodelistsize; /* # of vnodes on this mount */
--};
--
--
--#define MNT_ILOCK(mp) mtx_lock(&(mp)->mnt_mtx)
--#define MNT_IUNLOCK(mp) mtx_unlock(&(mp)->mnt_mtx)
--
--#endif /* _KERNEL */
-
- /*
- * User specifiable flags.
-@@ -374,190 +260,4 @@
- #define VFCF_LOOPBACK 0x00100000 /* aliases some other mounted FS */
- #define VFCF_UNICODE 0x00200000 /* stores file names as Unicode*/
-
--struct iovec;
--struct uio;
--
--#ifdef _KERNEL
--
--#ifdef MALLOC_DECLARE
--MALLOC_DECLARE(M_MOUNT);
--#endif
--extern int maxvfsconf; /* highest defined filesystem type */
--extern int nfs_mount_type; /* vfc_typenum for nfs, or -1 */
--extern struct vfsconf *vfsconf; /* head of list of filesystem types */
--
--/*
-- * Operations supported on mounted filesystem.
-- */
--struct mount_args;
--struct nameidata;
--
--typedef int vfs_mount_t(struct mount *mp, char *path, caddr_t data,
-- struct nameidata *ndp, struct thread *td);
--typedef int vfs_start_t(struct mount *mp, int flags, struct thread *td);
--typedef int vfs_unmount_t(struct mount *mp, int mntflags, struct thread *td);
--typedef int vfs_root_t(struct mount *mp, struct vnode **vpp);
--typedef int vfs_quotactl_t(struct mount *mp, int cmds, uid_t uid,
-- caddr_t arg, struct thread *td);
--typedef int vfs_statfs_t(struct mount *mp, struct statfs *sbp,
-- struct thread *td);
--typedef int vfs_sync_t(struct mount *mp, int waitfor, struct ucred *cred,
-- struct thread *td);
--typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags,
-- struct vnode **vpp);
--typedef int vfs_fhtovp_t(struct mount *mp, struct fid *fhp, struct vnode **vpp);
--typedef int vfs_checkexp_t(struct mount *mp, struct sockaddr *nam,
-- int *extflagsp, struct ucred **credanonp);
--typedef int vfs_vptofh_t(struct vnode *vp, struct fid *fhp);
--typedef int vfs_init_t(struct vfsconf *);
--typedef int vfs_uninit_t(struct vfsconf *);
--typedef int vfs_extattrctl_t(struct mount *mp, int cmd,
-- struct vnode *filename_vp, int attrnamespace,
-- const char *attrname, struct thread *td);
--typedef int vfs_nmount_t(struct mount *mp, struct nameidata *ndp,
-- struct thread *td);
--
--struct vfsops {
-- vfs_mount_t *vfs_mount;
-- vfs_start_t *vfs_start;
-- vfs_unmount_t *vfs_unmount;
-- vfs_root_t *vfs_root;
-- vfs_quotactl_t *vfs_quotactl;
-- vfs_statfs_t *vfs_statfs;
-- vfs_sync_t *vfs_sync;
-- vfs_vget_t *vfs_vget;
-- vfs_fhtovp_t *vfs_fhtovp;
-- vfs_checkexp_t *vfs_checkexp;
-- vfs_vptofh_t *vfs_vptofh;
-- vfs_init_t *vfs_init;
-- vfs_uninit_t *vfs_uninit;
-- vfs_extattrctl_t *vfs_extattrctl;
-- /* Additions below are not binary compatible with 5.0 and below. */
-- vfs_nmount_t *vfs_nmount;
--};
--
--#define VFS_NMOUNT(MP, NDP, P) (*(MP)->mnt_op->vfs_nmount)(MP, NDP, P)
--#define VFS_MOUNT(MP, PATH, DATA, NDP, P) \
-- (*(MP)->mnt_op->vfs_mount)(MP, PATH, DATA, NDP, P)
--#define VFS_START(MP, FLAGS, P) (*(MP)->mnt_op->vfs_start)(MP, FLAGS, P)
--#define VFS_UNMOUNT(MP, FORCE, P) (*(MP)->mnt_op->vfs_unmount)(MP, FORCE, P)
--#define VFS_ROOT(MP, VPP) (*(MP)->mnt_op->vfs_root)(MP, VPP)
--#define VFS_QUOTACTL(MP,C,U,A,P) (*(MP)->mnt_op->vfs_quotactl)(MP, C, U, A, P)
--#define VFS_STATFS(MP, SBP, P) (*(MP)->mnt_op->vfs_statfs)(MP, SBP, P)
--#define VFS_SYNC(MP, WAIT, C, P) (*(MP)->mnt_op->vfs_sync)(MP, WAIT, C, P)
--#define VFS_VGET(MP, INO, FLAGS, VPP) \
-- (*(MP)->mnt_op->vfs_vget)(MP, INO, FLAGS, VPP)
--#define VFS_FHTOVP(MP, FIDP, VPP) \
-- (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, VPP)
--#define VFS_VPTOFH(VP, FIDP) (*(VP)->v_mount->mnt_op->vfs_vptofh)(VP, FIDP)
--#define VFS_CHECKEXP(MP, NAM, EXFLG, CRED) \
-- (*(MP)->mnt_op->vfs_checkexp)(MP, NAM, EXFLG, CRED)
--#define VFS_EXTATTRCTL(MP, C, FN, NS, N, P) \
-- (*(MP)->mnt_op->vfs_extattrctl)(MP, C, FN, NS, N, P)
--
--#include <sys/module.h>
--
--#define VFS_SET(vfsops, fsname, flags) \
-- static struct vfsconf fsname ## _vfsconf = { \
-- &vfsops, \
-- #fsname, \
-- -1, \
-- 0, \
-- flags \
-- }; \
-- static moduledata_t fsname ## _mod = { \
-- #fsname, \
-- vfs_modevent, \
-- & fsname ## _vfsconf \
-- }; \
-- DECLARE_MODULE(fsname, fsname ## _mod, SI_SUB_VFS, SI_ORDER_MIDDLE)
--
--extern char *mountrootfsname;
--
--/*
-- * exported vnode operations
-- */
--int dounmount(struct mount *, int, struct thread *);
--int kernel_mount(struct iovec *, u_int, int);
--int kernel_vmount(int flags, ...);
--int vfs_getopt(struct vfsoptlist *, const char *, void **, int *);
--int vfs_copyopt(struct vfsoptlist *, const char *, void *, int);
--int vfs_mount(struct thread *, const char *, char *, int, void *);
--int vfs_nmount(struct thread *, int, struct uio *);
--int vfs_setpublicfs /* set publicly exported fs */
-- (struct mount *, struct netexport *, struct export_args *);
--int vfs_lock(struct mount *); /* lock a vfs */
--void vfs_msync(struct mount *, int);
--void vfs_unlock(struct mount *); /* unlock a vfs */
--int vfs_busy(struct mount *, int, struct mtx *, struct thread *);
--int vfs_export /* process mount export info */
-- (struct mount *, struct export_args *);
--struct netcred *vfs_export_lookup /* lookup host in fs export list */
-- (struct mount *, struct sockaddr *);
--int vfs_allocate_syncvnode(struct mount *);
--void vfs_getnewfsid(struct mount *);
--struct cdev *vfs_getrootfsid(struct mount *);
--struct mount *vfs_getvfs(fsid_t *); /* return vfs given fsid */
--int vfs_modevent(module_t, int, void *);
--int vfs_mountedon(struct vnode *); /* is a vfs mounted on vp */
--void vfs_mountroot(void); /* mount our root filesystem */
--int vfs_rootmountalloc(char *, char *, struct mount **);
--void vfs_mount_destroy(struct mount *, struct thread *);
--void vfs_unbusy(struct mount *, struct thread *);
--void vfs_unmountall(void);
--int vfs_register(struct vfsconf *);
--int vfs_unregister(struct vfsconf *);
--extern TAILQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */
--extern struct mtx mountlist_mtx;
--extern struct nfs_public nfs_pub;
--
--/*
-- * Declarations for these vfs default operations are located in
-- * kern/vfs_default.c, they should be used instead of making "dummy"
-- * functions or casting entries in the VFS op table to "enopnotsupp()".
-- */
--vfs_start_t vfs_stdstart;
--vfs_root_t vfs_stdroot;
--vfs_quotactl_t vfs_stdquotactl;
--vfs_statfs_t vfs_stdstatfs;
--vfs_sync_t vfs_stdsync;
--vfs_sync_t vfs_stdnosync;
--vfs_vget_t vfs_stdvget;
--vfs_fhtovp_t vfs_stdfhtovp;
--vfs_checkexp_t vfs_stdcheckexp;
--vfs_vptofh_t vfs_stdvptofh;
--vfs_init_t vfs_stdinit;
--vfs_uninit_t vfs_stduninit;
--vfs_extattrctl_t vfs_stdextattrctl;
--
--/* XXX - these should be indirect functions!!! */
--int softdep_fsync(struct vnode *);
--int softdep_process_worklist(struct mount *);
--
--#else /* !_KERNEL */
--
--#include <sys/cdefs.h>
--
--struct stat;
--
--__BEGIN_DECLS
--int fhopen(const struct fhandle *, int);
--int fhstat(const struct fhandle *, struct stat *);
--int fhstatfs(const struct fhandle *, struct statfs *);
--int fstatfs(int, struct statfs *);
--int getfh(const char *, fhandle_t *);
--int getfsstat(struct statfs *, long, int);
--int getmntinfo(struct statfs **, int);
--int lgetfh(const char *, fhandle_t *);
--int mount(const char *, const char *, int, void *);
--int nmount(struct iovec *, unsigned int, int);
--int statfs(const char *, struct statfs *);
--int unmount(const char *, int);
--
--/* C library stuff */
--int getvfsbyname(const char *, struct xvfsconf *);
--__END_DECLS
--
--#endif /* _KERNEL */
--
- #endif /* !_SYS_MOUNT_H_ */
-diff -Naur ufsutils.orig/include/sys/param.h ufsutils.new/include/sys/param.h
---- ufsutils.orig/include/sys/param.h 2004-06-26 04:21:20.000000000 +0200
-+++ ufsutils.new/include/sys/param.h 2004-06-28 23:39:30.000000000 +0200
-@@ -38,29 +38,6 @@
- #ifndef _SYS_PARAM_H_
- #define _SYS_PARAM_H_
-
--#include <sys/_null.h>
--
--#define BSD 199506 /* System version (year & month). */
--#define BSD4_3 1
--#define BSD4_4 1
--
--/*
-- * __FreeBSD_version numbers are documented in the Porter's Handbook.
-- * If you bump the version for any reason, you should update the documentation
-- * there.
-- * Currently this lives here:
-- *
-- * doc/en_US.ISO8859-1/books/porters-handbook/book.sgml
-- *
-- * scheme is: <major><two digit minor><0 if release branch, otherwise 1>xx
-- */
--#undef __FreeBSD_version
--#define __FreeBSD_version 502119 /* Master, propagated to newvers */
--
--#ifndef LOCORE
--#include <sys/types.h>
--#endif
--
- /*
- * Machine-independent constants (some used in following include files).
- * Redefined constants are from POSIX 1003.1 limits file.
-@@ -68,7 +45,7 @@
- * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)
- * MAXLOGNAME should be == UT_NAMESIZE+1 (see <utmp.h>)
- */
--#include <sys/syslimits.h>
-+#include <limits.h>
-
- #define MAXCOMLEN 19 /* max command name remembered */
- #define MAXINTERP 32 /* max interpreter file name length */
-@@ -81,79 +58,14 @@
- #define MAXHOSTNAMELEN 256 /* max hostname size */
- #define SPECNAMELEN 63 /* max length of devicename */
-
--/* More types and definitions used throughout the kernel. */
--#ifdef _KERNEL
--#if (defined(BURN_BRIDGES) || __FreeBSD_version >= 600000) \
-- && defined(OBSOLETE_IN_6)
--#error "This file contains obsolete code to be removed in 6.0-current"
--#endif
--#include <sys/cdefs.h>
--#include <sys/errno.h>
--#include <sys/time.h>
--#include <sys/priority.h>
--
--#define FALSE 0
--#define TRUE 1
--#endif
--
--#ifndef _KERNEL
--/* Signals. */
--#include <sys/signal.h>
--#endif
--
--/* Machine type dependent parameters. */
--#include <machine/param.h>
--#ifndef _KERNEL
--#include <sys/limits.h>
--#endif
--
--#ifndef _NO_NAMESPACE_POLLUTION
--
- #ifndef DEV_BSHIFT
- #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
- #endif
- #define DEV_BSIZE (1<<DEV_BSHIFT)
-
--#ifndef BLKDEV_IOSIZE
--#define BLKDEV_IOSIZE PAGE_SIZE /* default block device I/O size */
--#endif
--#ifndef DFLTPHYS
--#define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */
--#endif
- #ifndef MAXPHYS
- #define MAXPHYS (128 * 1024) /* max raw I/O transfer size */
- #endif
--#ifndef MAXDUMPPGS
--#define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE)
--#endif
--
--/*
-- * Constants related to network buffer management.
-- * MCLBYTES must be no larger than PAGE_SIZE.
-- */
--#ifndef MSIZE
--#define MSIZE 256 /* size of an mbuf */
--#endif /* MSIZE */
--
--#ifndef MCLSHIFT
--#define MCLSHIFT 11 /* convert bytes to mbuf clusters */
--#endif /* MCLSHIFT */
--
--#define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */
--
--/*
-- * Some macros for units conversion
-- */
--
--/* clicks to bytes */
--#ifndef ctob
--#define ctob(x) ((x)<<PAGE_SHIFT)
--#endif
--
--/* bytes to clicks */
--#ifndef btoc
--#define btoc(x) (((vm_offset_t)(x)+PAGE_MASK)>>PAGE_SHIFT)
--#endif
-
- /*
- * btodb() is messy and perhaps slow because `bytes' may be an off_t. We
-@@ -168,32 +80,11 @@
- : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT))
- #endif
-
--#ifndef dbtob
--#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
-- ((off_t)(db) << DEV_BSHIFT)
--#endif
--
--#endif /* _NO_NAMESPACE_POLLUTION */
--
--#define PRIMASK 0x0ff
--#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */
--#define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */
--
--#define NZERO 0 /* default "nice" */
--
- #define NBBY 8 /* number of bits in a byte */
- #define NBPW sizeof(int) /* number of bytes per word (integer) */
-
--#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */
--
- #define NODEV (dev_t)(-1) /* non-existent device */
-
--#define CBLOCK 128 /* Clist block size, must be a power of 2. */
--#define CBQSIZE (CBLOCK/NBBY) /* Quote bytes/cblock - can do better. */
-- /* Data chars/clist. */
--#define CBSIZE (CBLOCK - sizeof(struct cblock *) - CBQSIZE)
--#define CROUND (CBLOCK - 1) /* Clist rounding. */
--
- /*
- * File system parameters and macros.
- *
-@@ -252,71 +143,4 @@
- #define MIN(a,b) (((a)<(b))?(a):(b))
- #define MAX(a,b) (((a)>(b))?(a):(b))
-
--#ifdef _KERNEL
--/*
-- * Basic byte order function prototypes for non-inline functions.
-- */
--#ifndef _BYTEORDER_PROTOTYPED
--#define _BYTEORDER_PROTOTYPED
--__BEGIN_DECLS
--__uint32_t htonl(__uint32_t);
--__uint16_t htons(__uint16_t);
--__uint32_t ntohl(__uint32_t);
--__uint16_t ntohs(__uint16_t);
--__END_DECLS
--#endif
--
--#ifndef lint
--#ifndef _BYTEORDER_FUNC_DEFINED
--#define _BYTEORDER_FUNC_DEFINED
--#define htonl(x) __htonl(x)
--#define htons(x) __htons(x)
--#define ntohl(x) __ntohl(x)
--#define ntohs(x) __ntohs(x)
--#endif /* !_BYTEORDER_FUNC_DEFINED */
--#endif /* lint */
--#endif /* _KERNEL */
--
--/*
-- * Constants for setting the parameters of the kernel memory allocator.
-- *
-- * 2 ** MINBUCKET is the smallest unit of memory that will be
-- * allocated. It must be at least large enough to hold a pointer.
-- *
-- * Units of memory less or equal to MAXALLOCSAVE will permanently
-- * allocate physical memory; requests for these size pieces of
-- * memory are quite fast. Allocations greater than MAXALLOCSAVE must
-- * always allocate and free physical memory; requests for these
-- * size allocations should be done infrequently as they will be slow.
-- *
-- * Constraints: PAGE_SIZE <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and
-- * MAXALLOCSIZE must be a power of two.
-- */
--#if defined(__alpha__) || defined(__ia64__) || defined(__sparc64__)
--#define MINBUCKET 5 /* 5 => min allocation of 32 bytes */
--#else
--#define MINBUCKET 4 /* 4 => min allocation of 16 bytes */
--#endif
--#define MAXALLOCSAVE (2 * PAGE_SIZE)
--
--/*
-- * Scale factor for scaled integers used to count %cpu time and load avgs.
-- *
-- * The number of CPU `tick's that map to a unique `%age' can be expressed
-- * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that
-- * can be calculated (assuming 32 bits) can be closely approximated using
-- * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15).
-- *
-- * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age',
-- * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024.
-- */
--#define FSHIFT 11 /* bits to right of fixed binary point */
--#define FSCALE (1<<FSHIFT)
--
--#define dbtoc(db) /* calculates devblks to pages */ \
-- ((db + (ctodb(1) - 1)) >> (PAGE_SHIFT - DEV_BSHIFT))
--
--#define ctodb(db) /* calculates pages to devblks */ \
-- ((db) << (PAGE_SHIFT - DEV_BSHIFT))
--
- #endif /* _SYS_PARAM_H_ */
diff -Naur ufsutils.orig/include/sys/ucred.h ufsutils.new/include/sys/ucred.h
--- ufsutils.orig/include/sys/ucred.h 2004-04-30 05:41:53.000000000 +0200
+++ ufsutils.new/include/sys/ucred.h 2004-05-20 22:56:03.000000000 +0200
Added: trunk/ufsutils/debian/patches/00_mount.patch
===================================================================
--- trunk/ufsutils/debian/patches/00_mount.patch 2007-01-18 12:19:28 UTC (rev 1879)
+++ trunk/ufsutils/debian/patches/00_mount.patch 2007-01-18 13:34:26 UTC (rev 1880)
@@ -0,0 +1,445 @@
+#DPATCHLEVEL=1
+Index: uf-a/include/sys/mount.h
+===================================================================
+--- uf-a.orig/include/sys/mount.h 2006-10-24 17:02:40.000000000 +0200
++++ uf-a/include/sys/mount.h 2007-01-18 10:50:17.000000000 +0100
+@@ -34,14 +34,10 @@
+ #define _SYS_MOUNT_H_
+
+ #include <sys/ucred.h>
+-#include <sys/queue.h>
+-#ifdef _KERNEL
+-#include <sys/lockmgr.h>
+-#include <sys/_lock.h>
+-#include <sys/_mutex.h>
+-#endif
++#include <stdint.h>
++#include <sys/types.h>
++#include <sys/socket.h>
+
+-typedef struct fsid { int32_t val[2]; } fsid_t; /* filesystem id type */
+
+ /*
+ * File identifier.
+@@ -60,156 +56,6 @@
+ */
+ #define MFSNAMELEN 16 /* length of type name including null */
+ #define MNAMELEN 88 /* size of on/from name bufs */
+-#define STATFS_VERSION 0x20030518 /* current version number */
+-struct statfs {
+- uint32_t f_version; /* structure version number */
+- uint32_t f_type; /* type of filesystem */
+- uint64_t f_flags; /* copy of mount exported flags */
+- uint64_t f_bsize; /* filesystem fragment size */
+- uint64_t f_iosize; /* optimal transfer block size */
+- uint64_t f_blocks; /* total data blocks in filesystem */
+- uint64_t f_bfree; /* free blocks in filesystem */
+- int64_t f_bavail; /* free blocks avail to non-superuser */
+- uint64_t f_files; /* total file nodes in filesystem */
+- int64_t f_ffree; /* free nodes avail to non-superuser */
+- uint64_t f_syncwrites; /* count of sync writes since mount */
+- uint64_t f_asyncwrites; /* count of async writes since mount */
+- uint64_t f_syncreads; /* count of sync reads since mount */
+- uint64_t f_asyncreads; /* count of async reads since mount */
+- uint64_t f_spare[10]; /* unused spare */
+- uint32_t f_namemax; /* maximum filename length */
+- uid_t f_owner; /* user that mounted the filesystem */
+- fsid_t f_fsid; /* filesystem id */
+- char f_charspare[80]; /* spare string space */
+- char f_fstypename[MFSNAMELEN]; /* filesystem type name */
+- char f_mntfromname[MNAMELEN]; /* mounted filesystem */
+- char f_mntonname[MNAMELEN]; /* directory on which mounted */
+-};
+-
+-#ifdef _KERNEL
+-#define OMFSNAMELEN 16 /* length of fs type name, including null */
+-#define OMNAMELEN (88 - 2 * sizeof(long)) /* size of on/from name bufs */
+-
+-/* XXX getfsstat.2 is out of date with write and read counter changes here. */
+-/* XXX statfs.2 is out of date with read counter changes here. */
+-struct ostatfs {
+- long f_spare2; /* placeholder */
+- long f_bsize; /* fundamental filesystem block size */
+- long f_iosize; /* optimal transfer block size */
+- long f_blocks; /* total data blocks in filesystem */
+- long f_bfree; /* free blocks in fs */
+- long f_bavail; /* free blocks avail to non-superuser */
+- long f_files; /* total file nodes in filesystem */
+- long f_ffree; /* free file nodes in fs */
+- fsid_t f_fsid; /* filesystem id */
+- uid_t f_owner; /* user that mounted the filesystem */
+- int f_type; /* type of filesystem */
+- int f_flags; /* copy of mount exported flags */
+- long f_syncwrites; /* count of sync writes since mount */
+- long f_asyncwrites; /* count of async writes since mount */
+- char f_fstypename[OMFSNAMELEN]; /* fs type name */
+- char f_mntonname[OMNAMELEN]; /* directory on which mounted */
+- long f_syncreads; /* count of sync reads since mount */
+- long f_asyncreads; /* count of async reads since mount */
+- short f_spares1; /* unused spare */
+- char f_mntfromname[OMNAMELEN];/* mounted filesystem */
+- short f_spares2; /* unused spare */
+- /*
+- * XXX on machines where longs are aligned to 8-byte boundaries, there
+- * is an unnamed int32_t here. This spare was after the apparent end
+- * of the struct until we bit off the read counters from f_mntonname.
+- */
+- long f_spare[2]; /* unused spare */
+-};
+-
+-#define MMAXOPTIONLEN 65536 /* maximum length of a mount option */
+-
+-TAILQ_HEAD(vnodelst, vnode);
+-
+-struct vfsoptlist;
+-struct vfsopt;
+-
+-/*
+- * Structure per mounted filesystem. Each mounted filesystem has an
+- * array of operations and an instance record. The filesystems are
+- * put on a doubly linked list.
+- *
+- * Lock reference:
+- * m - mountlist_mtx
+- * i - interlock
+- * l - mnt_lock
+- *
+- * Unmarked fields are considered stable as long as a ref is held.
+- *
+- */
+-struct mount {
+-#define mnt_startzero mnt_list
+- TAILQ_ENTRY(mount) mnt_list; /* (m) mount list */
+- struct vfsops *mnt_op; /* operations on fs */
+- struct vfsconf *mnt_vfc; /* configuration info */
+- struct vnode *mnt_vnodecovered; /* vnode we mounted on */
+- struct vnode *mnt_syncer; /* syncer vnode */
+- struct vnodelst mnt_nvnodelist; /* (i) list of vnodes */
+-#define mnt_endzero mnt_lock
+- struct lock mnt_lock; /* mount structure lock */
+- struct mtx mnt_mtx; /* mount structure interlock */
+-#define mnt_startzero2 mnt_writeopcount
+- int mnt_writeopcount; /* (i) write syscalls pending */
+- u_int mnt_flag; /* (i) flags shared with user */
+- struct vfsoptlist *mnt_opt; /* current mount options */
+- struct vfsoptlist *mnt_optnew; /* new options passed to fs */
+- int mnt_kern_flag; /* (i) kernel only flags */
+- int mnt_maxsymlinklen; /* max size of short symlink */
+- struct statfs mnt_stat; /* cache of filesystem stats */
+- struct ucred *mnt_cred; /* credentials of mounter */
+- void * mnt_data; /* private data */
+- time_t mnt_time; /* last time written*/
+- int mnt_iosize_max; /* max size for clusters, etc */
+- struct netexport *mnt_export; /* export list */
+- struct label *mnt_mntlabel; /* MAC label for the mount */
+- struct label *mnt_fslabel; /* MAC label for the fs */
+- int mnt_nvnodelistsize; /* (i) # of vnodes */
+- u_int mnt_hashseed; /* Random seed for vfs_hash */
+- int mnt_markercnt; /* marker vnodes in use */
+- int mnt_holdcnt; /* hold count */
+- int mnt_holdcntwaiters; /* waits on hold count */
+- int mnt_secondary_writes; /* (i) # of secondary writes */
+-#define mnt_endzero2 mnt_secondary_accwrites
+- int mnt_secondary_accwrites;/* (i) secondary wr. starts */
+- int mnt_ref; /* (i) Reference count */
+- int mnt_gen; /* struct mount generation */
+-};
+-
+-struct vnode *__mnt_vnode_next(struct vnode **mvp, struct mount *mp);
+-struct vnode *__mnt_vnode_first(struct vnode **mvp, struct mount *mp);
+-void __mnt_vnode_markerfree(struct vnode **mvp, struct mount *mp);
+-
+-#define MNT_VNODE_FOREACH(vp, mp, mvp) \
+- for (vp = __mnt_vnode_first(&(mvp), (mp)); \
+- (vp) != NULL; vp = __mnt_vnode_next(&(mvp), (mp)))
+-
+-#define MNT_VNODE_FOREACH_ABORT_ILOCKED(mp, mvp) \
+- __mnt_vnode_markerfree(&(mvp), (mp))
+-
+-#define MNT_VNODE_FOREACH_ABORT(mp, mvp) \
+- do { \
+- MNT_ILOCK(mp); \
+- MNT_VNODE_FOREACH_ABORT_ILOCKED(mp, mvp); \
+- MNT_IUNLOCK(mp); \
+- } while (0)
+-
+-#define MNT_ILOCK(mp) mtx_lock(&(mp)->mnt_mtx)
+-#define MNT_ITRYLOCK(mp) mtx_trylock(&(mp)->mnt_mtx)
+-#define MNT_IUNLOCK(mp) mtx_unlock(&(mp)->mnt_mtx)
+-#define MNT_MTX(mp) (&(mp)->mnt_mtx)
+-#define MNT_REF(mp) (mp)->mnt_ref++
+-#define MNT_REL(mp) do { \
+- (mp)->mnt_ref--; \
+- if ((mp)->mnt_ref == 0) \
+- wakeup((mp)); \
+-} while (0)
+-
+-#endif /* _KERNEL */
+
+ /*
+ * User specifiable flags.
+@@ -371,6 +217,7 @@
+ char *np_index; /* Index file */
+ };
+
++#if 0
+ /*
+ * Filesystem configuration information. One of these exists for each
+ * type of filesystem supported by the kernel. These are searched at
+@@ -408,6 +255,7 @@
+ int vfc_flags;
+ };
+ #endif
++#endif
+
+ /*
+ * NB: these flags refer to IMPLEMENTATION properties, not properties of
+@@ -471,248 +319,4 @@
+ #define VQ_FLAG4000 0x4000 /* placeholder */
+ #define VQ_FLAG8000 0x8000 /* placeholder */
+
+-#ifdef _KERNEL
+-/* Point a sysctl request at a vfsidctl's data. */
+-#define VCTLTOREQ(vc, req) \
+- do { \
+- (req)->newptr = (vc)->vc_ptr; \
+- (req)->newlen = (vc)->vc_len; \
+- (req)->newidx = 0; \
+- } while (0)
+-#endif
+-
+-struct iovec;
+-struct uio;
+-
+-#ifdef _KERNEL
+-
+-#ifdef MALLOC_DECLARE
+-MALLOC_DECLARE(M_MOUNT);
+-#endif
+-extern int maxvfsconf; /* highest defined filesystem type */
+-extern int nfs_mount_type; /* vfc_typenum for nfs, or -1 */
+-
+-TAILQ_HEAD(vfsconfhead, vfsconf);
+-extern struct vfsconfhead vfsconf;
+-
+-/*
+- * Operations supported on mounted filesystem.
+- */
+-struct mount_args;
+-struct nameidata;
+-struct sysctl_req;
+-struct mntarg;
+-
+-typedef int vfs_cmount_t(struct mntarg *ma, void *data, int flags, struct thread *td);
+-typedef int vfs_unmount_t(struct mount *mp, int mntflags, struct thread *td);
+-typedef int vfs_root_t(struct mount *mp, int flags, struct vnode **vpp,
+- struct thread *td);
+-typedef int vfs_quotactl_t(struct mount *mp, int cmds, uid_t uid,
+- caddr_t arg, struct thread *td);
+-typedef int vfs_statfs_t(struct mount *mp, struct statfs *sbp,
+- struct thread *td);
+-typedef int vfs_sync_t(struct mount *mp, int waitfor, struct thread *td);
+-typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags,
+- struct vnode **vpp);
+-typedef int vfs_fhtovp_t(struct mount *mp, struct fid *fhp, struct vnode **vpp);
+-typedef int vfs_checkexp_t(struct mount *mp, struct sockaddr *nam,
+- int *extflagsp, struct ucred **credanonp);
+-typedef int vfs_vptofh_t(struct vnode *vp, struct fid *fhp);
+-typedef int vfs_init_t(struct vfsconf *);
+-typedef int vfs_uninit_t(struct vfsconf *);
+-typedef int vfs_extattrctl_t(struct mount *mp, int cmd,
+- struct vnode *filename_vp, int attrnamespace,
+- const char *attrname, struct thread *td);
+-typedef int vfs_mount_t(struct mount *mp, struct thread *td);
+-typedef int vfs_sysctl_t(struct mount *mp, fsctlop_t op,
+- struct sysctl_req *req);
+-
+-struct vfsops {
+- vfs_mount_t *vfs_mount;
+- vfs_cmount_t *vfs_cmount;
+- vfs_unmount_t *vfs_unmount;
+- vfs_root_t *vfs_root;
+- vfs_quotactl_t *vfs_quotactl;
+- vfs_statfs_t *vfs_statfs;
+- vfs_sync_t *vfs_sync;
+- vfs_vget_t *vfs_vget;
+- vfs_fhtovp_t *vfs_fhtovp;
+- vfs_checkexp_t *vfs_checkexp;
+- vfs_vptofh_t *vfs_vptofh;
+- vfs_init_t *vfs_init;
+- vfs_uninit_t *vfs_uninit;
+- vfs_extattrctl_t *vfs_extattrctl;
+- vfs_sysctl_t *vfs_sysctl;
+-};
+-
+-vfs_statfs_t __vfs_statfs;
+-
+-#define VFS_MOUNT(MP, P) (*(MP)->mnt_op->vfs_mount)(MP, P)
+-#define VFS_UNMOUNT(MP, FORCE, P) (*(MP)->mnt_op->vfs_unmount)(MP, FORCE, P)
+-#define VFS_ROOT(MP, FLAGS, VPP, P) \
+- (*(MP)->mnt_op->vfs_root)(MP, FLAGS, VPP, P)
+-#define VFS_QUOTACTL(MP,C,U,A,P) (*(MP)->mnt_op->vfs_quotactl)(MP, C, U, A, P)
+-#define VFS_STATFS(MP, SBP, P) __vfs_statfs((MP), (SBP), (P))
+-#define VFS_SYNC(MP, WAIT, P) (*(MP)->mnt_op->vfs_sync)(MP, WAIT, P)
+-#define VFS_VGET(MP, INO, FLAGS, VPP) \
+- (*(MP)->mnt_op->vfs_vget)(MP, INO, FLAGS, VPP)
+-#define VFS_FHTOVP(MP, FIDP, VPP) \
+- (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, VPP)
+-#define VFS_VPTOFH(VP, FIDP) (*(VP)->v_mount->mnt_op->vfs_vptofh)(VP, FIDP)
+-#define VFS_CHECKEXP(MP, NAM, EXFLG, CRED) \
+- (*(MP)->mnt_op->vfs_checkexp)(MP, NAM, EXFLG, CRED)
+-#define VFS_EXTATTRCTL(MP, C, FN, NS, N, P) \
+- (*(MP)->mnt_op->vfs_extattrctl)(MP, C, FN, NS, N, P)
+-#define VFS_SYSCTL(MP, OP, REQ) \
+- (*(MP)->mnt_op->vfs_sysctl)(MP, OP, REQ)
+-
+-extern int mpsafe_vfs;
+-
+-#define VFS_NEEDSGIANT(MP) \
+- (!mpsafe_vfs || ((MP) != NULL && ((MP)->mnt_kern_flag & MNTK_MPSAFE) == 0))
+-
+-#define VFS_LOCK_GIANT(MP) __extension__ \
+-({ \
+- int _locked; \
+- struct mount *_MP; \
+- _MP = (MP); \
+- if (VFS_NEEDSGIANT(_MP)) { \
+- mtx_lock(&Giant); \
+- _locked = 1; \
+- } else \
+- _locked = 0; \
+- _locked; \
+-})
+-#define VFS_UNLOCK_GIANT(locked) if ((locked)) mtx_unlock(&Giant);
+-#define VFS_ASSERT_GIANT(MP) do \
+-{ \
+- if (VFS_NEEDSGIANT((MP))) \
+- mtx_assert(&Giant, MA_OWNED); \
+-} while (0)
+-
+-#define VFS_KNOTE_LOCKED(vp, hint) do \
+-{ \
+- if (((vp)->v_vflag & VV_NOKNOTE) == 0) \
+- VN_KNOTE((vp), (hint), 1); \
+-} while (0)
+-
+-#define VFS_KNOTE_UNLOCKED(vp, hint) do \
+-{ \
+- if (((vp)->v_vflag & VV_NOKNOTE) == 0) \
+- VN_KNOTE((vp), (hint), 0); \
+-} while (0)
+-
+-#include <sys/module.h>
+-
+-/*
+- * Version numbers.
+- */
+-#define VFS_VERSION_00 0x19660120
+-#define VFS_VERSION VFS_VERSION_00
+-
+-#define VFS_SET(vfsops, fsname, flags) \
+- static struct vfsconf fsname ## _vfsconf = { \
+- .vfc_version = VFS_VERSION, \
+- .vfc_name = #fsname, \
+- .vfc_vfsops = &vfsops, \
+- .vfc_typenum = -1, \
+- .vfc_flags = flags, \
+- }; \
+- static moduledata_t fsname ## _mod = { \
+- #fsname, \
+- vfs_modevent, \
+- & fsname ## _vfsconf \
+- }; \
+- DECLARE_MODULE(fsname, fsname ## _mod, SI_SUB_VFS, SI_ORDER_MIDDLE)
+-
+-extern char *mountrootfsname;
+-
+-/*
+- * exported vnode operations
+- */
+-
+-int dounmount(struct mount *, int, struct thread *);
+-
+-int kernel_mount(struct mntarg *ma, int flags);
+-int kernel_vmount(int flags, ...);
+-struct mntarg *mount_arg(struct mntarg *ma, const char *name, const void *val, int len);
+-struct mntarg *mount_argb(struct mntarg *ma, int flag, const char *name);
+-struct mntarg *mount_argf(struct mntarg *ma, const char *name, const char *fmt, ...);
+-struct mntarg *mount_argsu(struct mntarg *ma, const char *name, const void *val, int len);
+-struct vfsconf *vfs_byname(const char *);
+-struct vfsconf *vfs_byname_kld(const char *, struct thread *td, int *);
+-void vfs_event_signal(fsid_t *, u_int32_t, intptr_t);
+-int vfs_flagopt(struct vfsoptlist *opts, const char *name, u_int *w, u_int val);
+-int vfs_getopt(struct vfsoptlist *, const char *, void **, int *);
+-char *vfs_getopts(struct vfsoptlist *, const char *, int *error);
+-int vfs_copyopt(struct vfsoptlist *, const char *, void *, int);
+-int vfs_filteropt(struct vfsoptlist *, const char **legal);
+-int vfs_scanopt(struct vfsoptlist *opts, const char *name, const char *fmt, ...);
+-int vfs_setpublicfs /* set publicly exported fs */
+- (struct mount *, struct netexport *, struct export_args *);
+-void vfs_msync(struct mount *, int);
+-int vfs_busy(struct mount *, int, struct mtx *, struct thread *);
+-int vfs_export /* process mount export info */
+- (struct mount *, struct export_args *);
+-int vfs_allocate_syncvnode(struct mount *);
+-void vfs_getnewfsid(struct mount *);
+-struct cdev *vfs_getrootfsid(struct mount *);
+-struct mount *vfs_getvfs(fsid_t *); /* return vfs given fsid */
+-int vfs_modevent(module_t, int, void *);
+-void vfs_mountroot(void); /* mount our root filesystem */
+-void vfs_mountedfrom(struct mount *, const char *from);
+-void vfs_ref(struct mount *);
+-void vfs_rel(struct mount *);
+-int vfs_suser(struct mount *, struct thread *);
+-void vfs_unbusy(struct mount *, struct thread *);
+-void vfs_unmountall(void);
+-extern TAILQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */
+-extern struct mtx mountlist_mtx;
+-extern struct nfs_public nfs_pub;
+-
+-/*
+- * Declarations for these vfs default operations are located in
+- * kern/vfs_default.c, they should be used instead of making "dummy"
+- * functions or casting entries in the VFS op table to "enopnotsupp()".
+- */
+-vfs_root_t vfs_stdroot;
+-vfs_quotactl_t vfs_stdquotactl;
+-vfs_statfs_t vfs_stdstatfs;
+-vfs_sync_t vfs_stdsync;
+-vfs_sync_t vfs_stdnosync;
+-vfs_vget_t vfs_stdvget;
+-vfs_fhtovp_t vfs_stdfhtovp;
+-vfs_checkexp_t vfs_stdcheckexp;
+-vfs_vptofh_t vfs_stdvptofh;
+-vfs_init_t vfs_stdinit;
+-vfs_uninit_t vfs_stduninit;
+-vfs_extattrctl_t vfs_stdextattrctl;
+-vfs_sysctl_t vfs_stdsysctl;
+-
+-#else /* !_KERNEL */
+-
+-#include <sys/cdefs.h>
+-
+-struct stat;
+-
+-__BEGIN_DECLS
+-int fhopen(const struct fhandle *, int);
+-int fhstat(const struct fhandle *, struct stat *);
+-int fhstatfs(const struct fhandle *, struct statfs *);
+-int fstatfs(int, struct statfs *);
+-int getfh(const char *, fhandle_t *);
+-int getfsstat(struct statfs *, long, int);
+-int getmntinfo(struct statfs **, int);
+-int lgetfh(const char *, fhandle_t *);
+-int mount(const char *, const char *, int, void *);
+-int nmount(struct iovec *, unsigned int, int);
+-int statfs(const char *, struct statfs *);
+-int unmount(const char *, int);
+-
+-/* C library stuff */
+-int getvfsbyname(const char *, struct xvfsconf *);
+-__END_DECLS
+-
+-#endif /* _KERNEL */
+-
+ #endif /* !_SYS_MOUNT_H_ */
Added: trunk/ufsutils/debian/patches/00_param.patch
===================================================================
--- trunk/ufsutils/debian/patches/00_param.patch 2007-01-18 12:19:28 UTC (rev 1879)
+++ trunk/ufsutils/debian/patches/00_param.patch 2007-01-18 13:34:26 UTC (rev 1880)
@@ -0,0 +1,62 @@
+#DPATCHLEVEL=1
+Index: a/include/sys/param.h
+===================================================================
+--- a.orig/include/sys/param.h 2006-10-24 17:02:40.000000000 +0200
++++ a/include/sys/param.h 2007-01-18 10:50:17.000000000 +0100
+@@ -38,6 +38,7 @@
+ #ifndef _SYS_PARAM_H_
+ #define _SYS_PARAM_H_
+
++#if 0
+ #include <sys/_null.h>
+
+ #define BSD 199506 /* System version (year & month). */
+@@ -71,6 +72,8 @@
+ * MAXLOGNAME should be == UT_NAMESIZE+1 (see <utmp.h>)
+ */
+ #include <sys/syslimits.h>
++#endif
++#include <limits.h>
+
+ #define MAXCOMLEN 19 /* max command name remembered */
+ #define MAXINTERP 32 /* max interpreter file name length */
+@@ -83,6 +86,7 @@
+ #define MAXHOSTNAMELEN 256 /* max hostname size */
+ #define SPECNAMELEN 63 /* max length of devicename */
+
++#if 0
+ /* More types and definitions used throughout the kernel. */
+ #ifdef _KERNEL
+ #include <sys/cdefs.h>
+@@ -106,6 +110,7 @@
+ #ifndef _KERNEL
+ #include <sys/limits.h>
+ #endif
++#endif
+
+ #ifndef _NO_NAMESPACE_POLLUTION
+
+@@ -183,7 +188,9 @@
+ #define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */
+ #define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */
+
++#if 0
+ #define NZERO 0 /* default "nice" */
++#endif
+
+ #define NBBY 8 /* number of bits in a byte */
+ #define NBPW sizeof(int) /* number of bytes per word (integer) */
+@@ -256,6 +263,7 @@
+ #define MIN(a,b) (((a)<(b))?(a):(b))
+ #define MAX(a,b) (((a)>(b))?(a):(b))
+
++#if 0
+ #ifdef _KERNEL
+ /*
+ * Basic byte order function prototypes for non-inline functions.
+@@ -319,4 +327,5 @@
+ #define __OpenSolaris_version 20060731
+ #endif
+
++#endif
+ #endif /* _SYS_PARAM_H_ */
Modified: trunk/ufsutils/debian/patches/02_fsck.ufs.patch
===================================================================
--- trunk/ufsutils/debian/patches/02_fsck.ufs.patch 2007-01-18 12:19:28 UTC (rev 1879)
+++ trunk/ufsutils/debian/patches/02_fsck.ufs.patch 2007-01-18 13:34:26 UTC (rev 1880)
@@ -1,94 +1,8 @@
#DPATCHLEVEL=1
-diff -Naur ufsutils.orig/fsck.ufs/dir.c ufsutils.new/fsck.ufs/dir.c
---- ufsutils.orig/fsck.ufs/dir.c 2004-04-09 21:58:28.000000000 +0200
-+++ ufsutils.new/fsck.ufs/dir.c 2004-05-16 22:51:52.000000000 +0200
-@@ -324,7 +324,7 @@
- }
- if (preen || reply("ADJUST") == 1) {
- if (bkgrdflag == 0) {
-- DIP(dp, di_nlink) -= lcnt;
-+ DIP_add(dp, di_nlink, -lcnt);
- inodirty();
- } else {
- cmd.value = idesc->id_number;
-@@ -474,7 +474,7 @@
- parentdir != (ino_t)-1)
- (void)makeentry(orphan, lfdir, "..");
- dp = ginode(lfdir);
-- DIP(dp, di_nlink)++;
-+ DIP_add(dp, di_nlink, 1);
- inodirty();
- inoinfo(lfdir)->ino_linkcnt++;
- pwarn("DIR I=%lu CONNECTED. ", (u_long)orphan);
-@@ -535,7 +535,7 @@
- idesc.id_name = strdup(name);
- dp = ginode(parent);
- if (DIP(dp, di_size) % DIRBLKSIZ) {
-- DIP(dp, di_size) = roundup(DIP(dp, di_size), DIRBLKSIZ);
-+ DIP_set(dp, di_size, roundup(DIP(dp, di_size), DIRBLKSIZ));
- inodirty();
- }
- if ((ckinode(dp, &idesc) & ALTERED) != 0)
-@@ -563,10 +563,10 @@
- return (0);
- if ((newblk = allocblk(sblock.fs_frag)) == 0)
- return (0);
-- DIP(dp, di_db[lastbn + 1]) = DIP(dp, di_db[lastbn]);
-- DIP(dp, di_db[lastbn]) = newblk;
-- DIP(dp, di_size) += sblock.fs_bsize;
-- DIP(dp, di_blocks) += btodb(sblock.fs_bsize);
-+ DIP_set(dp, di_db[lastbn + 1], DIP(dp, di_db[lastbn]));
-+ DIP_set(dp, di_db[lastbn], newblk);
-+ DIP_add(dp, di_size, sblock.fs_bsize);
-+ DIP_add(dp, di_blocks, btodb(sblock.fs_bsize));
- bp = getdirblk(DIP(dp, di_db[lastbn + 1]),
- sblksize(&sblock, DIP(dp, di_size), lastbn + 1));
- if (bp->b_errs)
-@@ -595,10 +595,10 @@
- inodirty();
- return (1);
- bad:
-- DIP(dp, di_db[lastbn]) = DIP(dp, di_db[lastbn + 1]);
-- DIP(dp, di_db[lastbn + 1]) = 0;
-- DIP(dp, di_size) -= sblock.fs_bsize;
-- DIP(dp, di_blocks) -= btodb(sblock.fs_bsize);
-+ DIP_set(dp, di_db[lastbn], DIP(dp, di_db[lastbn + 1]));
-+ DIP_set(dp, di_db[lastbn + 1], 0);
-+ DIP_add(dp, di_size, -sblock.fs_bsize);
-+ DIP_add(dp, di_blocks, -btodb(sblock.fs_bsize));
- freeblk(newblk, sblock.fs_frag);
- return (0);
- }
-@@ -632,7 +632,7 @@
- cp += DIRBLKSIZ)
- memmove(cp, &emptydir, sizeof emptydir);
- dirty(bp);
-- DIP(dp, di_nlink) = 2;
-+ DIP_set(dp, di_nlink, 2);
- inodirty();
- if (ino == ROOTINO) {
- inoinfo(ino)->ino_linkcnt = DIP(dp, di_nlink);
-@@ -654,7 +654,7 @@
- inoinfo(parent)->ino_linkcnt++;
- }
- dp = ginode(parent);
-- DIP(dp, di_nlink)++;
-+ DIP_add(dp, di_nlink, 1);
- inodirty();
- return (ino);
- }
-@@ -669,7 +669,7 @@
-
- if (ino != parent) {
- dp = ginode(parent);
-- DIP(dp, di_nlink)--;
-+ DIP_add(dp, di_nlink, -1);
- inodirty();
- }
- freeino(ino);
-diff -Naur ufsutils.orig/fsck.ufs/ea.c ufsutils.new/fsck.ufs/ea.c
---- ufsutils.orig/fsck.ufs/ea.c 2003-05-03 20:41:57.000000000 +0200
-+++ ufsutils.new/fsck.ufs/ea.c 2004-05-13 08:18:09.000000000 +0200
+Index: uf-a/fsck.ufs/ea.c
+===================================================================
+--- uf-a.orig/fsck.ufs/ea.c 2003-05-03 20:41:57.000000000 +0200
++++ uf-a/fsck.ufs/ea.c 2007-01-18 10:36:53.000000000 +0100
@@ -38,7 +38,7 @@
#include <sys/param.h>
@@ -98,11 +12,12 @@
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
-diff -Naur ufsutils.orig/fsck.ufs/fsck_ffs.8 ufsutils.new/fsck.ufs/fsck_ffs.8
---- ufsutils.orig/fsck.ufs/fsck_ffs.8 2004-04-09 21:58:28.000000000 +0200
-+++ ufsutils.new/fsck.ufs/fsck_ffs.8 2004-05-16 23:19:18.000000000 +0200
+Index: uf-a/fsck.ufs/fsck_ffs.8
+===================================================================
+--- uf-a.orig/fsck.ufs/fsck_ffs.8 2005-09-24 03:59:36.000000000 +0200
++++ uf-a/fsck.ufs/fsck_ffs.8 2007-01-18 10:36:53.000000000 +0100
@@ -30,11 +30,11 @@
- .\" $FreeBSD: src/sbin/fsck_ffs/fsck_ffs.8,v 1.30 2004/04/09 19:58:28 markm Exp $
+ .\" $FreeBSD: src/sbin/fsck_ffs/fsck_ffs.8,v 1.33.2.1 2005/09/24 01:59:36 keramida Exp $
.\"
.Dd April 24, 2001
-.Dt FSCK_FFS 8
@@ -116,16 +31,17 @@
.Nd file system consistency check and interactive repair
.Sh SYNOPSIS
.Nm
-@@ -311,5 +311,4 @@
+@@ -313,5 +313,4 @@
.Xr fstab 5 ,
.Xr fsck 8 ,
.Xr fsdb 8 ,
-.Xr newfs 8 ,
.Xr reboot 8
-diff -Naur ufsutils.orig/fsck.ufs/fsck.h ufsutils.new/fsck.ufs/fsck.h
---- ufsutils.orig/fsck.ufs/fsck.h 2004-04-09 21:58:28.000000000 +0200
-+++ ufsutils.new/fsck.ufs/fsck.h 2004-05-16 23:21:44.000000000 +0200
-@@ -55,6 +55,18 @@
+Index: uf-a/fsck.ufs/fsck.h
+===================================================================
+--- uf-a.orig/fsck.ufs/fsck.h 2005-03-07 09:42:49.000000000 +0100
++++ uf-a/fsck.ufs/fsck.h 2007-01-18 10:36:53.000000000 +0100
+@@ -76,6 +76,18 @@
#define DIP(dp, field) \
((sblock.fs_magic == FS_UFS1_MAGIC) ? \
(dp)->dp1.field : (dp)->dp2.field)
@@ -142,9 +58,9 @@
+ {if (sblock.fs_magic == FS_UFS1_MAGIC) \
+ (dp)->dp1.field |= (value); else (dp)->dp2.field |= (value);}
- /*
- * Each inode on the file system is described by the following structure.
-@@ -110,6 +122,10 @@
+ #define DIP_SET(dp, field, val) do { \
+ if (sblock.fs_magic == FS_UFS1_MAGIC) \
+@@ -148,6 +160,10 @@
#define IBLK(bp, i) \
((sblock.fs_magic == FS_UFS1_MAGIC) ? \
(bp)->b_un.b_indir1[i] : (bp)->b_un.b_indir2[i])
@@ -153,11 +69,12 @@
+ (bp)->b_un.b_indir1[i] = (value); \
+ else (bp)->b_un.b_indir2[i] = (value);}
- #define B_INUSE 1
-
-diff -Naur ufsutils.orig/fsck.ufs/fsutil.c ufsutils.new/fsck.ufs/fsutil.c
---- ufsutils.orig/fsck.ufs/fsutil.c 2004-04-09 21:58:28.000000000 +0200
-+++ ufsutils.new/fsck.ufs/fsutil.c 2004-05-16 20:37:54.000000000 +0200
+ #define IBLK_SET(bp, i, val) do { \
+ if (sblock.fs_magic == FS_UFS1_MAGIC) \
+Index: uf-a/fsck.ufs/fsutil.c
+===================================================================
+--- uf-a.orig/fsck.ufs/fsutil.c 2004-10-08 22:44:47.000000000 +0200
++++ uf-a/fsck.ufs/fsutil.c 2007-01-18 10:36:53.000000000 +0100
@@ -38,7 +38,9 @@
#include <sys/param.h>
#include <sys/time.h>
@@ -199,7 +116,7 @@
if (!preen) {
printf("\n***** FILE SYSTEM MARKED %s *****\n",
markclean ? "CLEAN" : "DIRTY");
-@@ -567,7 +572,7 @@
+@@ -565,7 +570,7 @@
}
void
@@ -208,7 +125,7 @@
{
ckfini(0);
-@@ -580,7 +585,7 @@
+@@ -578,7 +583,7 @@
* so that reboot sequence may be interrupted.
*/
void
@@ -217,7 +134,7 @@
{
printf("returning to single-user after file system check\n");
returntosingle = 1;
-@@ -649,11 +654,13 @@
+@@ -647,11 +652,13 @@
* Force foreground fsck to clean up inconsistency.
*/
if (bkgrdflag) {
@@ -231,7 +148,7 @@
fprintf(stdout, "CANNOT RUN IN BACKGROUND\n");
ckfini(0);
exit(EEXIT);
-@@ -670,6 +677,7 @@
+@@ -668,6 +675,7 @@
/*
* Force foreground fsck to clean up inconsistency.
*/
@@ -239,7 +156,7 @@
if (bkgrdflag) {
cmd.value = FS_NEEDSFSCK;
cmd.size = 1;
-@@ -677,6 +685,7 @@
+@@ -675,6 +683,7 @@
&cmd, sizeof cmd) == -1)
pwarn("CANNOT SET FS_NEEDSFSCK FLAG\n");
}
@@ -247,11 +164,12 @@
ckfini(0);
exit(EEXIT);
}
-diff -Naur ufsutils.orig/fsck.ufs/inode.c ufsutils.new/fsck.ufs/inode.c
---- ufsutils.orig/fsck.ufs/inode.c 2004-04-09 21:58:28.000000000 +0200
-+++ ufsutils.new/fsck.ufs/inode.c 2004-05-16 23:22:10.000000000 +0200
+Index: uf-a/fsck.ufs/inode.c
+===================================================================
+--- uf-a.orig/fsck.ufs/inode.c 2004-10-08 22:44:47.000000000 +0200
++++ uf-a/fsck.ufs/inode.c 2007-01-18 10:36:53.000000000 +0100
@@ -36,7 +36,7 @@
- __FBSDID("$FreeBSD: src/sbin/fsck_ffs/inode.c,v 1.35 2004/04/09 19:58:28 markm Exp $");
+ __FBSDID("$FreeBSD: src/sbin/fsck_ffs/inode.c,v 1.37 2004/10/08 20:44:47 truckman Exp $");
#include <sys/param.h>
-#include <sys/stdint.h>
@@ -267,44 +185,7 @@
#include "fsck.h"
-@@ -95,7 +96,8 @@
- pathbuf);
- if (reply("ADJUST LENGTH") == 1) {
- dp = ginode(idesc->id_number);
-- DIP(dp, di_size) = i * sblock.fs_bsize;
-+ DIP_set(dp, di_size,
-+ i * sblock.fs_bsize);
- printf(
- "YOU MUST RERUN FSCK AFTERWARDS\n");
- rerun = 1;
-@@ -133,7 +135,7 @@
- pathbuf);
- if (reply("ADJUST LENGTH") == 1) {
- dp = ginode(idesc->id_number);
-- DIP(dp, di_size) -= remsize;
-+ DIP_add(dp, di_size, -remsize);
- remsize = 0;
- printf(
- "YOU MUST RERUN FSCK AFTERWARDS\n");
-@@ -183,7 +185,7 @@
- if (preen) {
- pfatal("%s", buf);
- } else if (dofix(idesc, buf)) {
-- IBLK(bp, i) = 0;
-+ IBLK_set(bp, i, 0);
- dirty(bp);
- }
- }
-@@ -211,7 +213,7 @@
- pathbuf);
- if (reply("ADJUST LENGTH") == 1) {
- dp = ginode(idesc->id_number);
-- DIP(dp, di_size) -= isize;
-+ DIP_add(dp, di_size, -isize);
- isize = 0;
- printf(
- "YOU MUST RERUN FSCK AFTERWARDS\n");
-@@ -282,7 +284,7 @@
+@@ -285,7 +286,7 @@
ufs2_daddr_t iblk;
if (inumber < ROOTINO || inumber > maxino)
@@ -313,7 +194,7 @@
if (startinum == 0 ||
inumber < startinum || inumber >= startinum + INOPB(&sblock)) {
iblk = ino_to_fsba(&sblock, inumber);
-@@ -314,7 +316,7 @@
+@@ -317,7 +318,7 @@
static caddr_t nextinop;
if (inumber != nextino++ || inumber > lastvalidinum)
@@ -322,7 +203,7 @@
if (inumber >= lastinum) {
readcnt++;
dblk = fsbtodb(&sblock, ino_to_fsba(&sblock, lastinum));
-@@ -345,7 +347,7 @@
+@@ -348,7 +349,7 @@
{
if (inum % sblock.fs_ipg != 0)
@@ -331,7 +212,7 @@
lastvalidinum = inum + sblock.fs_ipg - 1;
startinum = 0;
nextino = inum;
-@@ -436,7 +438,7 @@
+@@ -439,7 +440,7 @@
continue;
return (inp);
}
@@ -340,41 +221,10 @@
return ((struct inoinfo *)0);
}
-@@ -630,20 +632,21 @@
- }
- cgdirty();
- dp = ginode(ino);
-- DIP(dp, di_db[0]) = allocblk((long)1);
-+ DIP_set(dp, di_db[0], allocblk((long)1));
- if (DIP(dp, di_db[0]) == 0) {
- inoinfo(ino)->ino_state = USTATE;
- return (0);
- }
-- DIP(dp, di_mode) = type;
-- DIP(dp, di_flags) = 0;
-- DIP(dp, di_atime) = time(NULL);
-- DIP(dp, di_mtime) = DIP(dp, di_ctime) = DIP(dp, di_atime);
-- DIP(dp, di_mtimensec) = 0;
-- DIP(dp, di_ctimensec) = 0;
-- DIP(dp, di_atimensec) = 0;
-- DIP(dp, di_size) = sblock.fs_fsize;
-- DIP(dp, di_blocks) = btodb(sblock.fs_fsize);
-+ DIP_set(dp, di_mode, type);
-+ DIP_set(dp, di_flags, 0);
-+ DIP_set(dp, di_atime, time(NULL));
-+ DIP_set(dp, di_mtime, DIP(dp, di_atime));
-+ DIP_set(dp, di_ctime, DIP(dp, di_atime));
-+ DIP_set(dp, di_mtimensec, 0);
-+ DIP_set(dp, di_ctimensec, 0);
-+ DIP_set(dp, di_atimensec, 0);
-+ DIP_set(dp, di_size, sblock.fs_fsize);
-+ DIP_set(dp, di_blocks, btodb(sblock.fs_fsize));
- n_files++;
- inodirty();
- inoinfo(ino)->ino_type = IFTODT(type);
-diff -Naur ufsutils.orig/fsck.ufs/main.c ufsutils.new/fsck.ufs/main.c
---- ufsutils.orig/fsck.ufs/main.c 2004-04-09 21:58:28.000000000 +0200
-+++ ufsutils.new/fsck.ufs/main.c 2004-05-16 23:15:12.000000000 +0200
+Index: uf-a/fsck.ufs/main.c
+===================================================================
+--- uf-a.orig/fsck.ufs/main.c 2005-02-10 10:19:29.000000000 +0100
++++ uf-a/fsck.ufs/main.c 2007-01-18 10:58:29.000000000 +0100
@@ -45,13 +45,22 @@
#include <sys/stat.h>
#include <sys/file.h>
@@ -465,27 +315,23 @@
if (bkgrdflag) {
signal(SIGALRM, alarmhandler);
itimerval.it_interval.tv_sec = 5;
-@@ -191,14 +208,18 @@
+@@ -191,11 +208,15 @@
checkfilesys(char *filesys)
{
ufs2_daddr_t n_ffree, n_bfree;
+#if HAVE_BSD_MOUNT
struct ufs_args args;
-+#endif
++#endif
struct dups *dp;
struct statfs *mntp;
- struct zlncnt *zlnp;
-+#if HAVE_UFS_SNAPSHOT && HAVE_BSD_STATFS
++#if HAVE_UFS_SNAPSHOT && HAVE_BSD_STATFS
struct stat snapdir;
struct group *grp;
-+#endif
++#endif
ufs2_daddr_t blks;
-- int cylno, ret;
-+ int cylno;
+ int cylno, ret;
ino_t files;
- size_t size;
-
-@@ -210,10 +231,12 @@
+@@ -209,10 +230,12 @@
* if it is listed among the mounted file systems. Failing that
* check to see if it is listed in /etc/fstab.
*/
@@ -498,7 +344,7 @@
filesys = blockcheck(filesys);
/*
* If -F flag specified, check to see whether a background check
-@@ -231,8 +254,10 @@
+@@ -230,8 +253,10 @@
if ((sblock.fs_flags & FS_DOSOFTDEP) == 0)
exit(5); /* Not running soft updates */
size = MIBSIZE;
@@ -509,7 +355,7 @@
if ((mntp == NULL && sblock.fs_clean == 1) ||
(mntp != NULL && (sblock.fs_flags & FS_UNCLEAN) == 0))
exit(7); /* Filesystem clean, report it now */
-@@ -245,6 +270,7 @@
+@@ -244,6 +269,7 @@
* return created snapshot file
* if not found, clear bkgrdflag and proceed with normal fsck
*/
@@ -555,16 +401,7 @@
if (blks < 0)
printf("%lld blocks missing\n", -(long long)blks);
if (duplist != NULL) {
-@@ -427,7 +458,7 @@
- if (zlnhead != NULL) {
- printf("The following zero link count inodes remain:");
- for (zlnp = zlnhead; zlnp; zlnp = zlnp->next)
-- printf(" %u,", zlnp->zlncnt);
-+ printf(" %lu,", zlnp->zlncnt);
- printf("\n");
- }
- }
-@@ -454,8 +485,13 @@
+@@ -447,8 +478,13 @@
/*
* Check to see if the file system is mounted read-write.
*/
@@ -578,7 +415,7 @@
ckfini(resolved);
for (cylno = 0; cylno < sblock.fs_ncg; cylno++)
-@@ -473,6 +509,9 @@
+@@ -466,6 +502,9 @@
* it unless it is read-write, so we can continue using it
* as safely as possible.
*/
@@ -588,7 +425,7 @@
if (mntp->f_flags & MNT_RDONLY) {
args.fspec = 0;
args.export.ex_flags = 0;
-@@ -484,6 +523,20 @@
+@@ -477,6 +516,20 @@
pwarn("mount reload of '%s' failed: %s\n\n",
mntp->f_mntonname, strerror(errno));
}
@@ -609,7 +446,7 @@
if (!fsmodified)
return (0);
if (!preen)
-@@ -494,6 +547,7 @@
+@@ -487,6 +540,7 @@
return (0);
}
@@ -617,38 +454,29 @@
/*
* Get the mount point information for name.
*/
-@@ -533,13 +587,14 @@
+@@ -526,13 +580,14 @@
statfsp = NULL;
return (statfsp);
}
+-
+#endif
-
++
static void
-usage(void)
+usage(char *progname)
{
(void) fprintf(stderr,
"usage: %s [-BFpfny] [-b block] [-c level] [-m mode] "
- "file system ...\n",
+ "filesystem ...\n",
- getprogname());
+ progname);
exit(1);
}
-diff -Naur ufsutils.orig/fsck.ufs/pass1.c ufsutils.new/fsck.ufs/pass1.c
---- ufsutils.orig/fsck.ufs/pass1.c 2004-04-09 21:58:28.000000000 +0200
-+++ ufsutils.new/fsck.ufs/pass1.c 2004-05-16 23:02:25.000000000 +0200
-@@ -236,8 +236,8 @@
- }
- if (!preen && mode == IFMT && reply("HOLD BAD BLOCK") == 1) {
- dp = ginode(inumber);
-- DIP(dp, di_size) = sblock.fs_fsize;
-- DIP(dp, di_mode) = IFREG|0600;
-+ DIP_set(dp, di_size, sblock.fs_fsize);
-+ DIP_set(dp, di_mode, IFREG|0600);
- inodirty();
- }
- if ((mode == IFBLK || mode == IFCHR || mode == IFIFO ||
-@@ -328,9 +328,11 @@
+Index: uf-a/fsck.ufs/pass1.c
+===================================================================
+--- uf-a.orig/fsck.ufs/pass1.c 2004-10-08 22:44:47.000000000 +0200
++++ uf-a/fsck.ufs/pass1.c 2007-01-18 10:36:53.000000000 +0100
+@@ -317,9 +317,11 @@
inoinfo(inumber)->ino_type = IFTODT(mode);
badblk = dupblk = 0;
idesc->id_number = inumber;
@@ -660,71 +488,11 @@
idesc->id_type = ADDR;
(void)ckinode(dp, idesc);
if (sblock.fs_magic == FS_UFS2_MAGIC && dp->dp2.di_extsize > 0) {
-@@ -364,7 +366,7 @@
- return;
- if (bkgrdflag == 0) {
- dp = ginode(inumber);
-- DIP(dp, di_blocks) = idesc->id_entryno;
-+ DIP_set(dp, di_blocks, idesc->id_entryno);
- inodirty();
- } else {
- cmd.value = idesc->id_number;
-diff -Naur ufsutils.orig/fsck.ufs/pass2.c ufsutils.new/fsck.ufs/pass2.c
---- ufsutils.orig/fsck.ufs/pass2.c 2004-04-09 21:58:28.000000000 +0200
-+++ ufsutils.new/fsck.ufs/pass2.c 2004-05-16 23:03:36.000000000 +0200
-@@ -103,8 +103,8 @@
- exit(EEXIT);
- }
- dp = ginode(ROOTINO);
-- DIP(dp, di_mode) &= ~IFMT;
-- DIP(dp, di_mode) |= IFDIR;
-+ DIP_and(dp, di_mode, ~IFMT);
-+ DIP_or(dp, di_mode, IFDIR);
- inodirty();
- break;
-
-@@ -149,7 +149,7 @@
- inp->i_isize = roundup(MINDIRSIZE, DIRBLKSIZ);
- if (reply("FIX") == 1) {
- dp = ginode(inp->i_number);
-- DIP(dp, di_size) = inp->i_isize;
-+ DIP_set(dp, di_size, inp->i_isize);
- inodirty();
- }
- } else if ((inp->i_isize & (DIRBLKSIZ - 1)) != 0) {
-@@ -167,22 +167,22 @@
- inp->i_isize = roundup(inp->i_isize, DIRBLKSIZ);
- if (preen || reply("ADJUST") == 1) {
- dp = ginode(inp->i_number);
-- DIP(dp, di_size) =
-- roundup(inp->i_isize, DIRBLKSIZ);
-+ DIP_set(dp, di_size,
-+ roundup(inp->i_isize, DIRBLKSIZ));
- inodirty();
- }
- }
- dp = &dino;
- memset(dp, 0, sizeof(struct ufs2_dinode));
-- DIP(dp, di_mode) = IFDIR;
-- DIP(dp, di_size) = inp->i_isize;
-+ DIP_set(dp, di_mode, IFDIR);
-+ DIP_set(dp, di_size, inp->i_isize);
- for (i = 0;
- i < (inp->i_numblks<NDADDR ? inp->i_numblks : NDADDR);
- i++)
-- DIP(dp, di_db[i]) = inp->i_blks[i];
-+ DIP_set(dp, di_db[i], inp->i_blks[i]);
- if (inp->i_numblks > NDADDR)
- for (i = 0; i < NIADDR; i++)
-- DIP(dp, di_ib[i]) = inp->i_blks[NDADDR + i];
-+ DIP_set(dp, di_ib[i], inp->i_blks[NDADDR + i]);
- curino.id_number = inp->i_number;
- curino.id_parent = inp->i_parent;
- (void)ckinode(dp, &curino);
-diff -Naur ufsutils.orig/fsck.ufs/pass4.c ufsutils.new/fsck.ufs/pass4.c
---- ufsutils.orig/fsck.ufs/pass4.c 2004-04-09 21:58:28.000000000 +0200
-+++ ufsutils.new/fsck.ufs/pass4.c 2004-05-13 08:22:35.000000000 +0200
-@@ -114,7 +114,7 @@
+Index: uf-a/fsck.ufs/pass4.c
+===================================================================
+--- uf-a.orig/fsck.ufs/pass4.c 2004-10-08 22:44:47.000000000 +0200
++++ uf-a/fsck.ufs/pass4.c 2007-01-18 10:36:53.000000000 +0100
+@@ -111,7 +111,7 @@
break;
default:
@@ -733,11 +501,12 @@
inoinfo(inumber)->ino_state, inumber);
}
}
-diff -Naur ufsutils.orig/fsck.ufs/setup.c ufsutils.new/fsck.ufs/setup.c
---- ufsutils.orig/fsck.ufs/setup.c 2004-04-09 21:58:28.000000000 +0200
-+++ ufsutils.new/fsck.ufs/setup.c 2004-05-13 08:04:18.000000000 +0200
+Index: uf-a/fsck.ufs/setup.c
+===================================================================
+--- uf-a.orig/fsck.ufs/setup.c 2005-03-07 09:42:49.000000000 +0100
++++ uf-a/fsck.ufs/setup.c 2007-01-18 10:36:53.000000000 +0100
@@ -36,11 +36,14 @@
- __FBSDID("$FreeBSD: src/sbin/fsck_ffs/setup.c,v 1.47 2004/04/09 19:58:28 markm Exp $");
+ __FBSDID("$FreeBSD: src/sbin/fsck_ffs/setup.c,v 1.49 2005/03/07 08:42:49 delphij Exp $");
#include <sys/param.h>
+#include <sys/types.h>
@@ -783,7 +552,7 @@
size = MIBSIZE;
if (sysctlnametomib("vfs.ffs.adjrefcnt", adjrefcnt, &size) < 0||
sysctlnametomib("vfs.ffs.adjblkcnt", adjblkcnt, &size) < 0||
-@@ -142,6 +149,7 @@
+@@ -160,6 +167,7 @@
}
cmd.version = FFS_CMD_VERSION;
cmd.handle = fsreadfd;
@@ -791,7 +560,7 @@
fswritefd = -1;
}
if (preen == 0)
-@@ -453,6 +461,8 @@
+@@ -471,6 +479,8 @@
return (0);
}
lp = getdisklabel(dev, devfd);
@@ -800,7 +569,7 @@
if (isdigit(*cp))
pp = &lp->d_partitions[0];
else
-@@ -503,13 +513,17 @@
+@@ -521,13 +531,17 @@
static struct disklabel *
getdisklabel(char *s, int fd)
{
@@ -818,9 +587,10 @@
return (&lab);
+#endif
}
-diff -Naur ufsutils.orig/fsck.ufs/utilities.c ufsutils.new/fsck.ufs/utilities.c
---- ufsutils.orig/fsck.ufs/utilities.c 2004-04-09 21:58:28.000000000 +0200
-+++ ufsutils.new/fsck.ufs/utilities.c 2004-05-16 20:38:02.000000000 +0200
+Index: uf-a/fsck.ufs/utilities.c
+===================================================================
+--- uf-a.orig/fsck.ufs/utilities.c 2004-04-09 21:58:28.000000000 +0200
++++ uf-a/fsck.ufs/utilities.c 2007-01-18 10:36:53.000000000 +0100
@@ -108,14 +108,16 @@
return (origname);
}
@@ -840,11 +610,12 @@
{
got_sigalarm = 1;
}
-diff -Naur ufsutils.orig/fsck.ufs/Makefile ufsutilsi.new/fsck.ufs/Makefile
---- ufsutils.orig/fsck.ufs/Makefile 2004-02-23 21:13:51.000000000 +0100
-+++ ufsutils.new/fsck.ufs/Makefile 2004-05-24 02:34:48.000000000 +0200
+Index: uf-a/fsck.ufs/Makefile
+===================================================================
+--- uf-a.orig/fsck.ufs/Makefile 2004-09-01 10:26:39.000000000 +0200
++++ uf-a/fsck.ufs/Makefile 2007-01-18 10:36:53.000000000 +0100
@@ -1,16 +1,19 @@
- # $FreeBSD: src/sbin/fsck_ffs/Makefile,v 1.14 2004/02/23 20:13:51 johan Exp $
+ # $FreeBSD: src/sbin/fsck_ffs/Makefile,v 1.16 2004/09/01 08:26:39 scottl Exp $
# @(#)Makefile 8.2 (Berkeley) 4/27/95
-PROG= fsck_ffs
Modified: trunk/ufsutils/debian/patches/02_fsdb.ufs.patch
===================================================================
--- trunk/ufsutils/debian/patches/02_fsdb.ufs.patch 2007-01-18 12:19:28 UTC (rev 1879)
+++ trunk/ufsutils/debian/patches/02_fsdb.ufs.patch 2007-01-18 13:34:26 UTC (rev 1880)
@@ -1,19 +1,21 @@
#DPATCHLEVEL=1
-diff -Naur ufsutils.orig/fsdb.ufs/fsdb.8 ufsutils.new/fsdb.ufs/fsdb.8
---- ufsutils.orig/fsdb.ufs/fsdb.8 2003-08-30 09:49:42.000000000 +0200
-+++ ufsutils.new/fsdb.ufs/fsdb.8 2004-05-13 08:22:41.000000000 +0200
-@@ -242,7 +242,7 @@
- ported it to
- .Fx .
+Index: uf-a/fsdb.ufs/fsdb.8
+===================================================================
+--- uf-a.orig/fsdb.ufs/fsdb.8 2006-09-22 13:20:10.000000000 +0200
++++ uf-a/fsdb.ufs/fsdb.8 2007-01-18 10:41:04.000000000 +0100
+@@ -263,7 +263,7 @@
+ .Nm
+ does not implement.
.Sh WARNING
-Use this tool with extreme caution--you can damage an FFS file system
+Use this tool with extreme caution\-\-you can damage an FFS file system
beyond what
.Xr fsck 8
can repair.
-diff -Naur ufsutils.orig/fsdb.ufs/fsdb.c ufsutils.new/fsdb.ufs/fsdb.c
---- ufsutils.orig/fsdb.ufs/fsdb.c 2003-11-13 20:08:43.000000000 +0100
-+++ ufsutils.new/fsdb.ufs/fsdb.c 2004-05-16 23:07:42.000000000 +0200
+Index: uf-a/fsdb.ufs/fsdb.c
+===================================================================
+--- uf-a.orig/fsdb.ufs/fsdb.c 2006-09-22 13:20:10.000000000 +0200
++++ uf-a/fsdb.ufs/fsdb.c 2007-01-18 11:12:31.000000000 +0100
@@ -35,13 +35,13 @@
#include <sys/param.h>
@@ -29,7 +31,26 @@
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
-@@ -200,7 +200,7 @@
+@@ -60,6 +60,18 @@
+ static int find_indirblks32(uint32_t blk, int ind_level, uint32_t *blknum);
+ static int find_indirblks64(uint64_t blk, int ind_level, uint64_t *blknum);
+
++static inline int32_t
++_time_to_time32(time_t t)
++{
++ return((int32_t)t);
++}
++
++static inline int64_t
++_time_to_time64(time_t t)
++{
++ return((int64_t)t);
++}
++
+ static void
+ usage(void)
+ {
+@@ -211,7 +223,7 @@
prompt(EditLine *el)
{
static char pstring[64];
@@ -38,18 +59,8 @@
return pstring;
}
-@@ -223,7 +223,9 @@
- printactive(0);
+@@ -298,7 +310,7 @@
- hist = history_init();
-+#if HAVE_BSD_LIBEDIT_H_EVENT
- history(hist, &he, H_EVENT, 100); /* 100 elt history buffer */
-+#endif
-
- elptr = el_init("fsdb", stdin, stdout, stderr);
- el_set(elptr, EL_EDITOR, "emacs");
-@@ -286,7 +288,7 @@
-
#define GETINUM(ac,inum) inum = strtoul(argv[ac], &cp, 0); \
if (inum < ROOTINO || inum > maxino || cp == argv[ac] || *cp != '\0' ) { \
- printf("inode %d out of range; range is [%d,%d]\n", \
@@ -57,30 +68,8 @@
inum, ROOTINO, maxino); \
return 1; \
}
-@@ -351,8 +353,8 @@
- {
- if (!checkactive())
+@@ -750,7 +762,7 @@
return 1;
-- DIP(curinode, di_nlink) += 1;
-- printf("inode %d link count now %d\n", curinum, DIP(curinode, di_nlink));
-+ DIP_add(curinode, di_nlink, 1);
-+ printf("inode %ld link count now %d\n", curinum, DIP(curinode, di_nlink));
- inodirty();
- return 0;
- }
-@@ -361,8 +363,8 @@
- {
- if (!checkactive())
- return 1;
-- DIP(curinode, di_nlink) -= 1;
-- printf("inode %d link count now %d\n", curinum, DIP(curinode, di_nlink));
-+ DIP_add(curinode, di_nlink, -1);
-+ printf("inode %ld link count now %d\n", curinum, DIP(curinode, di_nlink));
- inodirty();
- return 0;
- }
-@@ -482,7 +484,7 @@
- return 1;
rval = makeentry(curinum, inum, argv[2]);
if (rval)
- printf("Ino %d entered as `%s'\n", inum, argv[2]);
@@ -88,127 +77,10 @@
else
printf("could not enter name? weird.\n");
curinode = ginode(curinum);
-@@ -635,8 +637,8 @@
- warnx("try one of `file', `dir', `socket', `fifo'");
- return 1;
- }
-- DIP(curinode, di_mode) &= ~IFMT;
-- DIP(curinode, di_mode) |= type;
-+ DIP_and(curinode, di_mode, ~IFMT);
-+ DIP_or(curinode, di_mode, type);
- inodirty();
- printactive(0);
- return 0;
-@@ -657,7 +659,7 @@
- return 1;
- }
-
-- DIP(curinode, di_size) = len;
-+ DIP_set(curinode, di_size, len);
- inodirty();
- printactive(0);
- return rval;
-@@ -678,8 +680,8 @@
- return 1;
- }
-
-- DIP(curinode, di_mode) &= ~07777;
-- DIP(curinode, di_mode) |= modebits;
-+ DIP_and(curinode, di_mode, ~07777);
-+ DIP_or(curinode, di_mode, modebits);
- inodirty();
- printactive(0);
- return rval;
-@@ -704,7 +706,7 @@
- warnx("flags set beyond 32-bit range of field (%lx)\n", flags);
- return(1);
- }
-- DIP(curinode, di_flags) = flags;
-+ DIP_set(curinode, di_flags, flags);
- inodirty();
- printactive(0);
- return rval;
-@@ -729,7 +731,7 @@
- warnx("gen set beyond 32-bit range of field (%lx)\n", gen);
- return(1);
- }
-- DIP(curinode, di_gen) = gen;
-+ DIP_set(curinode, di_gen, gen);
- inodirty();
- printactive(0);
- return rval;
-@@ -754,7 +756,7 @@
- return 1;
- }
-
-- DIP(curinode, di_nlink) = lcnt;
-+ DIP_set(curinode, di_nlink, lcnt);
- inodirty();
- printactive(0);
- return rval;
-@@ -781,7 +783,7 @@
- }
- }
-
-- DIP(curinode, di_uid) = uid;
-+ DIP_set(curinode, di_uid, uid);
- inodirty();
- printactive(0);
- return rval;
-@@ -807,7 +809,7 @@
- }
- }
-
-- DIP(curinode, di_gid) = gid;
-+ DIP_set(curinode, di_gid, gid);
- inodirty();
- printactive(0);
- return rval;
-@@ -874,10 +876,10 @@
- if (dotime(argv[1], &secs, &nsecs))
- return 1;
- if (sblock.fs_magic == FS_UFS1_MAGIC)
-- curinode->dp1.di_mtime = _time_to_time32(secs);
-+ curinode->dp1.di_mtime = (int32_t)secs;
- else
-- curinode->dp2.di_mtime = _time_to_time64(secs);
-- DIP(curinode, di_mtimensec) = nsecs;
-+ curinode->dp2.di_mtime = (int64_t)secs;
-+ DIP_set(curinode, di_mtimensec, nsecs);
- inodirty();
- printactive(0);
- return 0;
-@@ -891,10 +893,10 @@
- if (dotime(argv[1], &secs, &nsecs))
- return 1;
- if (sblock.fs_magic == FS_UFS1_MAGIC)
-- curinode->dp1.di_atime = _time_to_time32(secs);
-+ curinode->dp1.di_atime = (int32_t)secs;
- else
-- curinode->dp2.di_atime = _time_to_time64(secs);
-- DIP(curinode, di_atimensec) = nsecs;
-+ curinode->dp2.di_atime = (int64_t)secs;
-+ DIP_set(curinode, di_atimensec, nsecs);
- inodirty();
- printactive(0);
- return 0;
-@@ -908,10 +910,10 @@
- if (dotime(argv[1], &secs, &nsecs))
- return 1;
- if (sblock.fs_magic == FS_UFS1_MAGIC)
-- curinode->dp1.di_ctime = _time_to_time32(secs);
-+ curinode->dp1.di_ctime = (int32_t)secs;
- else
-- curinode->dp2.di_ctime = _time_to_time64(secs);
-- DIP(curinode, di_ctimensec) = nsecs;
-+ curinode->dp2.di_ctime = (int64_t)secs;
-+ DIP_set(curinode, di_ctimensec, nsecs);
- inodirty();
- printactive(0);
- return 0;
-diff -Naur ufsutils.orig/fsdb.ufs/fsdbutil.c ufsutils.new/fsdb.ufs/fsdbutil.c
---- ufsutils.orig/fsdb.ufs/fsdbutil.c 2003-11-13 20:08:43.000000000 +0100
-+++ ufsutils.new/fsdb.ufs/fsdbutil.c 2004-05-16 20:39:43.000000000 +0200
+Index: uf-a/fsdb.ufs/fsdbutil.c
+===================================================================
+--- uf-a.orig/fsdb.ufs/fsdbutil.c 2006-09-22 13:20:10.000000000 +0200
++++ uf-a/fsdb.ufs/fsdbutil.c 2007-01-18 11:12:19.000000000 +0100
@@ -41,7 +41,6 @@
#include <stdint.h>
#include <string.h>
@@ -217,9 +89,22 @@
#include <ufs/ufs/dinode.h>
#include <ufs/ffs/fs.h>
-@@ -157,23 +156,23 @@
- printf("I=%lu MODE=%o SIZE=%ju", (u_long)inum, DIP(dp, di_mode),
- (uintmax_t)DIP(dp, di_size));
+@@ -51,6 +50,12 @@
+ #include "fsdb.h"
+ #include "fsck.h"
+
++static inline time_t
++_time64_to_time(int64_t t64)
++{
++ return((time_t)t64);
++}
++
+ static int charsperline(void);
+ static int printindir(ufs2_daddr_t blk, int level, char *bufp);
+ static void printblocks(ino_t inum, union dinode *dp);
+@@ -163,23 +168,23 @@
+ dp->dp2.di_birthnsec);
+ }
if (sblock.fs_magic == FS_UFS1_MAGIC)
- t = _time32_to_time(dp->dp1.di_mtime);
+ t = (time_t)dp->dp1.di_mtime;
@@ -247,7 +132,7 @@
p = ctime(&t);
printf("\n\tATIME=%15.15s %4.4s [%d nsec]\n", &p[4], &p[20],
DIP(dp, di_atimensec));
-@@ -285,7 +284,7 @@
+@@ -291,7 +296,7 @@
long ndb, offset;
ufs2_daddr_t blkno;
@@ -256,7 +141,7 @@
printf("Direct blocks:\n");
ndb = howmany(DIP(dp, di_size), sblock.fs_bsize);
for (i = 0; i < NDADDR; i++) {
-@@ -335,7 +334,7 @@
+@@ -341,7 +346,7 @@
return 0;
}
if ((DIP(curinode, di_mode) & IFMT) != IFDIR) {
@@ -265,7 +150,7 @@
return 0;
}
return 1;
-@@ -360,10 +359,10 @@
+@@ -366,10 +371,10 @@
printstat("current inode", curinum, curinode);
break;
case 0:
@@ -278,12 +163,13 @@
curinum, DIP(curinode, di_mode) & IFMT, DIP(curinode, di_mode));
break;
}
-diff -Naur ufsutils.orig/fsdb.ufs/Makefile ufsutils.new/fsdb.ufs/Makefile
---- ufsutils.orig/fsdb.ufs/Makefile 2004-02-05 23:44:23.000000000 +0100
-+++ ufsutils.new/fsdb.ufs/Makefile 2004-05-16 21:37:50.000000000 +0200
-@@ -2,14 +2,14 @@
+Index: uf-a/fsdb.ufs/Makefile
+===================================================================
+--- uf-a.orig/fsdb.ufs/Makefile 2004-10-09 17:56:34.000000000 +0200
++++ uf-a/fsdb.ufs/Makefile 2007-01-18 10:46:15.000000000 +0100
+@@ -2,15 +2,13 @@
# @(#)Makefile 8.1 (Berkeley) 6/5/93
- # $FreeBSD: src/sbin/fsdb/Makefile,v 1.17 2004/02/05 22:44:23 ru Exp $
+ # $FreeBSD: src/sbin/fsdb/Makefile,v 1.19 2004/10/09 15:56:34 le Exp $
-PROG= fsdb
-MAN= fsdb.8
@@ -291,6 +177,7 @@
- dir.c ea.c fsutil.c inode.c pass1.c pass1b.c pass2.c pass3.c pass4.c \
- pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c
-CFLAGS+= -I${.CURDIR}/../fsck_ffs
+-WARNS?= 2
-LDADD= -ledit -ltermcap
-DPADD= ${LIBEDIT} ${LIBTERMCAP}
-.PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs
@@ -298,11 +185,11 @@
+MAN = fsdb.8:fsdb.ufs.8
+SRCS = fsdb.c fsdbutil.c
+WARNS = 0
-+
+LDADD += -ledit -ltermcap -L../libufs -lufs -L../fsck.ufs -lfsck.ufs
+DPADD += ${LIBEDIT} ${LIBTERMCAP}
+INCLUDES = -I../fsck.ufs
-+
-+include ../Makefile.common
-.include <bsd.prog.mk>
++include ../Makefile.common
++
+\ No newline at end of file
Modified: trunk/ufsutils/debian/patches/02_growfs.ufs.patch
===================================================================
--- trunk/ufsutils/debian/patches/02_growfs.ufs.patch 2007-01-18 12:19:28 UTC (rev 1879)
+++ trunk/ufsutils/debian/patches/02_growfs.ufs.patch 2007-01-18 13:34:26 UTC (rev 1880)
@@ -1,8 +1,9 @@
#DPATCHLEVEL=1
-diff -Naur ufsutils.orig/growfs.ufs/growfs.c ufsutils.new/growfs.ufs/growfs.c
---- ufsutils.orig/growfs.ufs/growfs.c 2004-04-04 06:17:07.000000000 +0200
-+++ ufsutils.new/growfs.ufs/growfs.c 2004-05-16 22:45:14.000000000 +0200
-@@ -56,7 +56,6 @@
+Index: uf-a/growfs.ufs/growfs.c
+===================================================================
+--- uf-a.orig/growfs.ufs/growfs.c 2007-01-18 11:14:06.000000000 +0100
++++ uf-a/growfs.ufs/growfs.c 2007-01-18 11:14:17.000000000 +0100
+@@ -54,7 +54,6 @@
#include <sys/disklabel.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
@@ -10,27 +11,7 @@
#include <stdio.h>
#include <paths.h>
-@@ -110,6 +109,10 @@
- #define DIP(dp, field) \
- ((sblock.fs_magic == FS_UFS1_MAGIC) ? \
- (uint32_t)(dp)->dp1.field : (dp)->dp2.field)
-+#define DIP_set(dp, field, value) \
-+ {if (sblock.fs_magic == FS_UFS1_MAGIC) \
-+ (dp)->dp1.field = (uint32_t)(value); \
-+ else (dp)->dp2.field = (value);}
- static ufs2_daddr_t inoblk; /* inode block address */
- static char inobuf[MAXBSIZE]; /* inode block */
- ino_t maxino; /* last valid inode */
-@@ -1846,7 +1849,7 @@
- return NULL;
- }
- if (inumber < ROOTINO || inumber > maxino)
-- errx(8, "bad inode number %d to ginode", inumber);
-+ errx(8, "bad inode number %ld to ginode", inumber);
- if (startinum == 0 ||
- inumber < startinum || inumber >= startinum + INOPB(&sblock)) {
- inoblk = fsbtodb(&sblock, ino_to_fsba(&sblock, inumber));
-@@ -1903,10 +1906,12 @@
+@@ -1930,10 +1929,12 @@
int sectorsize;
off_t mediasize;
@@ -43,7 +24,7 @@
if (sectorsize <= 0)
errx(1, "bogus sectorsize: %d", sectorsize);
-@@ -2262,9 +2267,11 @@
+@@ -2289,9 +2290,11 @@
}
lp->d_checksum=sum;
@@ -55,7 +36,7 @@
}
free(lp);
-@@ -2288,8 +2295,10 @@
+@@ -2315,8 +2318,10 @@
if (!lab)
errx(1, "malloc failed");
@@ -66,56 +47,35 @@
unlabeled++;
-@@ -2420,7 +2429,7 @@
- if (iptr == 0)
- continue;
- if (cond_bl_upd(&iptr, bp, fsi, fso, Nflag)) {
-- DIP(ino, di_db[i]) = iptr;
-+ DIP_set(ino, di_db[i], iptr);
- inodeupdated++;
- }
- }
-@@ -2434,7 +2443,7 @@
- if (iptr == 0)
- continue;
- if (cond_bl_upd(&iptr, bp, fsi, fso, Nflag)) {
-- DIP(ino, di_ib[i]) = iptr;
-+ DIP_set(ino, di_ib[i], iptr);
- inodeupdated++;
- }
- indirchk(blksperindir, lbn, iptr, numblks, bp, fsi, fso, Nflag);
-diff -Naur ufsutils.orig/growfs.ufs/Makefile ufsutils.new/growfs.ufs/Makefile
---- ufsutils.orig/growfs.ufs/Makefile 2004-04-04 01:56:24.000000000 +0200
-+++ ufsutils.new/growfs.ufs/Makefile 2004-05-16 21:37:56.000000000 +0200
-@@ -4,17 +4,21 @@
- # $FreeBSD: src/sbin/growfs/Makefile,v 1.9 2004/04/03 23:56:24 mux Exp $
- #
+Index: uf-a/growfs.ufs/Makefile
+===================================================================
+--- uf-a.orig/growfs.ufs/Makefile 2007-01-18 11:14:06.000000000 +0100
++++ uf-a/growfs.ufs/Makefile 2007-01-18 11:14:17.000000000 +0100
+@@ -6,14 +6,18 @@
--#GFSDBG=YES
-+MAINTAINER= tomsoft at FreeBSD.ORG, chm at FreeBSD.ORG
+ #GFSDBG=
-PROG= growfs
--SRCS= growfs.c
++PROG= growfs.ufs
+ SRCS= growfs.c
-MAN= growfs.8
-+PROG = growfs.ufs
-+MAN = growfs.8:growfs.ufs.8
-+SRCS = growfs.c
++MAN= growfs.8:growfs.ufs.8
-WARNS?= 6
+ifdef GFSDBG
+SRCS += debug.c
+ALL_CFLAGS = -DFS_DEBUG
+endif
-
--.if defined(GFSDBG)
--SRCS+= debug.c
--CFLAGS+=-DFS_DEBUG
--.endif
++
+WARNS = 6
-+
+LDADD = -L../libufs -lufs
+INCLUDES =
-+
-+include ../Makefile.common
+-.if defined(GFSDBG)
+-SRCS+= debug.c
+-.endif
+-
-.include <bsd.prog.mk>
++include ../Makefile.common
++
+\ No newline at end of file
Deleted: trunk/ufsutils/debian/patches/03_mkfs.ufs_operator_gid.patch
===================================================================
--- trunk/ufsutils/debian/patches/03_mkfs.ufs_operator_gid.patch 2007-01-18 12:19:28 UTC (rev 1879)
+++ trunk/ufsutils/debian/patches/03_mkfs.ufs_operator_gid.patch 2007-01-18 13:34:26 UTC (rev 1880)
@@ -1,15 +0,0 @@
-#DPATCHLEVEL=1
-diff -Naur ufsutils-0.0+2004.06.26.orig/mkfs.ufs/mkfs.c ufsutils-0.0+2004.06.26/mkfs.ufs/mkfs.c
---- ufsutils-0.0+2004.06.26.orig/mkfs.ufs/mkfs.c 2005-02-03 08:34:18.000000000 +0100
-+++ ufsutils-0.0+2004.06.26/mkfs.ufs/mkfs.c 2005-02-03 08:36:07.000000000 +0100
-@@ -737,7 +737,9 @@
-
- memset(&node, 0, sizeof node);
- if ((grp = getgrnam("operator")) == NULL)
-- errx(35, "Cannot retrieve operator gid");
-+ grp = getgrnam("root")
-+ if (grp == NULL)
-+ errx(35, "Cannot retrieve operator nor root gid");
- if (sblock.fs_magic == FS_UFS1_MAGIC) {
- /*
- * initialize the node
Added: trunk/ufsutils/debian/patches/03_ufsmount.patch
===================================================================
--- trunk/ufsutils/debian/patches/03_ufsmount.patch 2007-01-18 12:19:28 UTC (rev 1879)
+++ trunk/ufsutils/debian/patches/03_ufsmount.patch 2007-01-18 13:34:26 UTC (rev 1880)
@@ -0,0 +1,13 @@
+#DPATCHLEVEL=1
+diff -Naur ufsutils/include/ufs/ufs/ufsmount.h ufsutils/include/ufs/ufs/ufsmount.h
+--- ufsutils/include/ufs/ufs/ufsmount.h 2007-01-18 14:08:22.000000000 +0100
++++ ufsutils/include/ufs/ufs/ufsmount.h 2007-01-18 14:08:22.000000000 +0100
+@@ -33,8 +33,6 @@
+ #ifndef _UFS_UFS_UFSMOUNT_H_
+ #define _UFS_UFS_UFSMOUNT_H_
+
+-#include <sys/buf.h> /* XXX For struct workhead. */
+-
+ /*
+ * Arguments to mount UFS-based filesystems
+ */
Modified: trunk/ufsutils/debian/upstream.sh
===================================================================
--- trunk/ufsutils/debian/upstream.sh 2007-01-18 12:19:28 UTC (rev 1879)
+++ trunk/ufsutils/debian/upstream.sh 2007-01-18 13:34:26 UTC (rev 1880)
@@ -1,6 +1,8 @@
#!/bin/bash
cvsroot=":ext:anoncvs at anoncvs.fr.freebsd.org:/home/ncvs"
+RELENG=RELENG_6_2_0_RELEASE
+#RELENG=HEAD
srcs=" \
src/sbin/badsect:badsect.ufs \
@@ -12,7 +14,7 @@
src/sbin/newfs:mkfs.ufs \
src/sbin/tunefs:tunefs.ufs \
src/sbin/bsdlabel:bsdlabel \
- src/sbin/sunlabel:sunlable \
+ src/sbin/sunlabel:sunlabel \
src/sbin/ffsinfo:ffsinfo \
src/lib/libufs:libufs \
src/sys/ufs:include"
@@ -22,6 +24,12 @@
src/sys/sys/mount.h:include/sys \
src/sys/sys/param.h:include/sys \
src/sys/sys/ucred.h:include/sys"
+
+libc_files=" \
+ src/lib/libc/gen/arc4random.c:libport \
+ src/lib/libc/string/strlcat.c:libport \
+ src/lib/libc/string/strlcpy.c:libport"
+
move_repo()
{
@@ -32,9 +40,6 @@
repo=${src//:*/}
dest=${src//*:/}
echo " -> moving $repo to $dest"
- if [ ! -d $repo ]; then
- mkdir -p $dest
- fi
mv $repo $dest
done
}
@@ -50,24 +55,26 @@
echo $orig
}
-echo "-> Downloading upstream sources ..."
-repos=`get_cvs_list $srcs`
+echo "-> Downloading all upstream sources ..."
+repos=`get_cvs_list $srcs $include_files $libc_files`
+
# Note: Does not use co -d because freebsd cvs server has
# a fascist connection limit (2)
-cvs -z3 -d$cvsroot co $repos
-mkdir include
+cvs -z3 -d$cvsroot co -r $RELENG $repos
+rm -rf badsect.ufs bsdlabel dump.ufs dumpfs.ufs ffsinfo fsck.ufs fsdb.ufs growfs.ufs include libufs libport mkfs.ufs sunlabel tunefs.ufs libdisklabel
+
+mkdir -p include/sys libport
+
echo "-> Moving upstream sources to the proper place ..."
move_repo $srcs
-echo "-> Downloading upstream includes ..."
-cvs_includes=`get_cvs_list $include_files`
-cvs -z3 -d$cvsroot co $cvs_includes
-
echo "-> Moving upstream includes to the proper place ..."
move_repo $include_files
+echo "-> Moving upstream libc bits to the proper place ..."
+move_repo $libc_files
+
echo "-> Cleaning the mess ..."
rm -rf src
-
More information about the Glibc-bsd-commits
mailing list