[Glibc-bsd-commits] r2062 - in trunk/ufsutils/debian: . patches
ps-guest at alioth.debian.org
ps-guest at alioth.debian.org
Fri Dec 7 18:32:38 UTC 2007
Author: ps-guest
Date: 2007-12-07 18:32:38 +0000 (Fri, 07 Dec 2007)
New Revision: 2062
Added:
trunk/ufsutils/debian/patches/series
Removed:
trunk/ufsutils/debian/patch.mk
Modified:
trunk/ufsutils/debian/changelog
trunk/ufsutils/debian/control
trunk/ufsutils/debian/patches/00_mount.patch
trunk/ufsutils/debian/patches/00_param.patch
trunk/ufsutils/debian/patches/01_libufs.patch
trunk/ufsutils/debian/patches/02_bsdlabel.ufs.patch
trunk/ufsutils/debian/patches/02_fsck.ufs.patch
trunk/ufsutils/debian/rules
trunk/ufsutils/debian/upstream.sh
Log:
* ufsutils - snapshot of RELENG_7
builds on kfreebsd, but needs more cleanup
untested at all
Modified: trunk/ufsutils/debian/changelog
===================================================================
--- trunk/ufsutils/debian/changelog 2007-12-07 12:18:57 UTC (rev 2061)
+++ trunk/ufsutils/debian/changelog 2007-12-07 18:32:38 UTC (rev 2062)
@@ -1,12 +1,13 @@
-ufsutils (6.2-0.1) UNRELEASED; urgency=low
+ufsutils (7.0~cvs200712xx-1) UNRELEASED; urgency=low
[Petr Salinger]
- * upgrade to 6.2 release
- * include all needed sources in debian/upstream.sh
- * make it build much cleanly on kfreebsd (it might broke linux)
+ * Add build-dependency on quilt, and use quilt in debian/rules
+ * New upstream snapshot of RELENG_7
+ * Include all needed sources in debian/upstream.sh
+ * Make it build much cleanly on kfreebsd (it might broke linux)
ino_t is int32 on kfreebsd-any !!!
- -- Guillem Jover <guillem at debian.org> Fri, 19 Jan 2007 08:29:58 +0100
+ -- Guillem Jover <guillem at debian.org> Fri, 07 Dec 2007 18:49:11 +0100
ufsutils (0.0+2004.06.26-5) UNRELEASED; urgency=low
Modified: trunk/ufsutils/debian/control
===================================================================
--- trunk/ufsutils/debian/control 2007-12-07 12:18:57 UTC (rev 2061)
+++ trunk/ufsutils/debian/control 2007-12-07 18:32:38 UTC (rev 2062)
@@ -2,7 +2,7 @@
Section: utils
Priority: optional
Maintainer: Guillem Jover <guillem at debian.org>
-Build-Depends: debhelper (>= 5), libedit-dev, libncurses5-dev
+Build-Depends: debhelper (>= 5), quilt, libedit-dev, libncurses5-dev
Standards-Version: 3.6.2
Package: ufsutils
Deleted: trunk/ufsutils/debian/patch.mk
===================================================================
--- trunk/ufsutils/debian/patch.mk 2007-12-07 12:18:57 UTC (rev 2061)
+++ trunk/ufsutils/debian/patch.mk 2007-12-07 18:32:38 UTC (rev 2062)
@@ -1,95 +0,0 @@
-# -*- mode: makefile; coding: utf-8 -*-
-# Copyright © 2002,2003 Colin Walters <walters at debian.org>
-#
-# Modified by Guillem Jover <guillem at debian.org>:
-# Standalone system
-# Honour DPATCHLEVEL
-# Exit when trying to revert patches but no stamp-patch exists
-# Provide a patch target
-#
-# Description: A sample patch system which uses separate files in debian/patches
-# Patch names must end in .patch, currently.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-# 02111-1307 USA.
-
-DEB_SRCDIR ?= .
-DEB_PATCHDIRS = debian/patches
-DEB_PATCHES = $(foreach dir,$(DEB_PATCHDIRS),$(shell LC_COLLATE=C echo $(wildcard $(dir)/*.patch) $(wildcard $(dir)/*.diff)))
-
-patch: apply-patches
-
-unpatch: reverse-patches
- rm -f debian/stamp-patch*
- rm -f debian/patches/*.log
-
-# The patch subsystem
-apply-patches: debian/stamp-patched
-debian/stamp-patched: $(DEB_PATCHES)
-debian/stamp-patched reverse-patches:
- @echo "patches: $(DEB_PATCHES)"
- @set -e ; reverse=""; patches="$(DEB_PATCHES)"; \
- if [ "$@" = "reverse-patches" ]; then \
- if [ ! -e debian/stamp-patched ]; then \
- echo "Not reversing not applied patches."; \
- exit 0; \
- fi; \
- reverse="-R"; \
- for patch in $$patches; do reversepatches="$$patch $$reversepatches"; done; \
- patches="$$reversepatches"; \
- fi; \
- for patch in $$patches; do \
- level=$$(head $$patch | egrep '^#DPATCHLEVEL=' | cut -f 2 -d '='); \
- reverse=""; \
- if [ "$@" = "reverse-patches" ]; then reverse="-R"; fi; \
- success=""; \
- if [ -z "$$level" ]; then \
- echo -n "Trying "; if test -n "$$reverse"; then echo -n "reversed "; fi; echo -n "patch $$patch at level "; \
- for level in 0 1 2; do \
- if test -z "$$success"; then \
- echo -n "$$level..."; \
- if cat $$patch | patch -d $(DEB_SRCDIR) $$reverse -E --dry-run -p$$level 1>$$patch.level-$$level.log 2>&1; then \
- if cat $$patch | patch -d $(DEB_SRCDIR) $$reverse -E --no-backup-if-mismatch -V never -p$$level 1>$$patch.level-$$level.log 2>&1; then \
- success=yes; \
- touch debian/stamp-patch-$$(basename $$patch); \
- echo "success."; \
- fi; \
- fi; \
- fi; \
- done; \
- if test -z "$$success"; then \
- if test -z "$$reverse"; then \
- echo "failure."; \
- exit 1; \
- else \
- echo "failure (ignored)."; \
- fi \
- fi; \
- else \
- echo -n "Trying patch $$patch at level $$level..."; \
- if cat $$patch | patch -d $(DEB_SRCDIR) $$reverse -E --no-backup-if-mismatch -V never -p$$level 1>$$patch.log 2>&1; then \
- touch debian/stamp-patch-$$(basename $$patch); \
- echo "success."; \
- else \
- echo "failure:"; \
- cat $$patch.log; \
- if test -z "$$reverse"; then exit 1; fi; \
- fi; \
- fi; \
- done
- if [ "$@" = "debian/stamp-patched" ]; then touch debian/stamp-patched; fi
-
-.PHONY: patch unpatch apply-patches reverse-patches
-
Modified: trunk/ufsutils/debian/patches/00_mount.patch
===================================================================
--- trunk/ufsutils/debian/patches/00_mount.patch 2007-12-07 12:18:57 UTC (rev 2061)
+++ trunk/ufsutils/debian/patches/00_mount.patch 2007-12-07 18:32:38 UTC (rev 2062)
@@ -1,9 +1,9 @@
#DPATCHLEVEL=1
-Index: uf-a/include/sys/mount.h
+Index: ufsutils/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 @@
+--- ufsutils.orig/include/sys/mount.h 2007-09-12 18:31:32.000000000 +0200
++++ ufsutils/include/sys/mount.h 2007-12-07 18:58:42.000000000 +0100
+@@ -34,14 +34,11 @@
#define _SYS_MOUNT_H_
#include <sys/ucred.h>
@@ -14,6 +14,7 @@
-#include <sys/_mutex.h>
-#endif
+#include <stdint.h>
++#include <sys/vfs.h>
+#include <sys/types.h>
+#include <sys/socket.h>
@@ -21,164 +22,23 @@
/*
* File identifier.
-@@ -60,156 +56,6 @@
+@@ -60,6 +56,7 @@
*/
#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 */
++#if 0
+ #define STATFS_VERSION 0x20030518 /* current version number */
+ struct statfs {
+ uint32_t f_version; /* structure version number */
+@@ -209,6 +206,7 @@
+ } while (0)
+ #endif /* _KERNEL */
++#endif
+
/*
* User specifiable flags.
-@@ -371,6 +217,7 @@
+@@ -383,6 +381,7 @@
char *np_index; /* Index file */
};
@@ -186,7 +46,7 @@
/*
* Filesystem configuration information. One of these exists for each
* type of filesystem supported by the kernel. These are searched at
-@@ -408,6 +255,7 @@
+@@ -420,6 +419,7 @@
int vfc_flags;
};
#endif
@@ -194,252 +54,18 @@
/*
* NB: these flags refer to IMPLEMENTATION properties, not properties of
-@@ -471,248 +319,4 @@
+@@ -484,6 +484,7 @@
#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
++#if 0
+ #ifdef _KERNEL
+ /* Point a sysctl request at a vfsidctl's data. */
+ #define VCTLTOREQ(vc, req) \
+@@ -739,5 +740,5 @@
+ __END_DECLS
+
+ #endif /* _KERNEL */
-
--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
#endif /* !_SYS_MOUNT_H_ */
Modified: trunk/ufsutils/debian/patches/00_param.patch
===================================================================
--- trunk/ufsutils/debian/patches/00_param.patch 2007-12-07 12:18:57 UTC (rev 2061)
+++ trunk/ufsutils/debian/patches/00_param.patch 2007-12-07 18:32:38 UTC (rev 2062)
@@ -11,11 +11,12 @@
#include <sys/_null.h>
#define BSD 199506 /* System version (year & month). */
-@@ -71,6 +72,8 @@
+@@ -71,6 +72,9 @@
* MAXLOGNAME should be == UT_NAMESIZE+1 (see <utmp.h>)
*/
#include <sys/syslimits.h>
+#endif
++#include <sys/types.h>
+#include <limits.h>
#define MAXCOMLEN 19 /* max command name remembered */
Modified: trunk/ufsutils/debian/patches/01_libufs.patch
===================================================================
--- trunk/ufsutils/debian/patches/01_libufs.patch 2007-12-07 12:18:57 UTC (rev 2061)
+++ trunk/ufsutils/debian/patches/01_libufs.patch 2007-12-07 18:32:38 UTC (rev 2062)
@@ -1,7 +1,8 @@
#DPATCHLEVEL=1
-diff -Naur ufsutils.orig/include/ufs/ffs/fs.h ufsutils.new/include/ufs/ffs/fs.h
---- ufsutils.orig/include/ufs/ffs/fs.h 2004-04-07 05:47:20.000000000 +0200
-+++ ufsutils.new/include/ufs/ffs/fs.h 2004-05-13 08:43:33.000000000 +0200
+Index: ufsutils/include/ufs/ffs/fs.h
+===================================================================
+--- ufsutils.orig/include/ufs/ffs/fs.h 2007-12-07 19:29:33.767834000 +0100
++++ ufsutils/include/ufs/ffs/fs.h 2007-12-07 19:30:02.000000000 +0100
@@ -33,6 +33,9 @@
#ifndef _UFS_FFS_FS_H_
#define _UFS_FFS_FS_H_
@@ -12,10 +13,11 @@
/*
* Each disk drive contains some number of filesystems.
* A filesystem consists of a number of cylinder groups.
-diff -Naur ufsutils.orig/include/ufs/ufs/dinode.h ufsutils.new/include/ufs/ufs/dinode.h
---- ufsutils.orig/include/ufs/ufs/dinode.h 2002-07-17 00:36:00.000000000 +0200
-+++ ufsutils.new/include/ufs/ufs/dinode.h 2004-05-13 08:15:51.000000000 +0200
-@@ -47,6 +47,8 @@
+Index: ufsutils/include/ufs/ufs/dinode.h
+===================================================================
+--- ufsutils.orig/include/ufs/ufs/dinode.h 2007-12-07 19:29:33.792676000 +0100
++++ ufsutils/include/ufs/ufs/dinode.h 2007-12-07 19:30:02.000000000 +0100
+@@ -68,6 +68,8 @@
#ifndef _UFS_UFS_DINODE_H_
#define _UFS_UFS_DINODE_H_
@@ -24,9 +26,10 @@
/*
* The root inode is the root of the filesystem. Inode 0 can't be used for
* normal purposes and historically bad blocks were linked to inode 1, thus
-diff -Naur ufsutils.orig/include/ufs/ufs/dir.h ufsutils.new/include/ufs/ufs/dir.h
---- ufsutils.orig/include/ufs/ufs/dir.h 2004-04-07 05:47:20.000000000 +0200
-+++ ufsutils.new/include/ufs/ufs/dir.h 2004-05-13 08:16:08.000000000 +0200
+Index: ufsutils/include/ufs/ufs/dir.h
+===================================================================
+--- ufsutils.orig/include/ufs/ufs/dir.h 2007-12-07 19:29:33.826139000 +0100
++++ ufsutils/include/ufs/ufs/dir.h 2007-12-07 19:30:02.000000000 +0100
@@ -38,6 +38,8 @@
#ifndef _UFS_UFS_DIR_H_
#define _UFS_UFS_DIR_H_
@@ -36,40 +39,42 @@
/*
* Theoretically, directories can be more than 2Gb in length, however, in
* practice this seems unlikely. So, we define the type doff_t as a 32-bit
-diff -Naur ufsutils.orig/libufs/Makefile ufsutils.new/libufs/Makefile
---- ufsutils.orig/libufs/Makefile 2003-08-18 17:25:39.000000000 +0200
-+++ ufsutils.new/libufs/Makefile 2004-05-16 21:38:38.000000000 +0200
-@@ -1,20 +1,16 @@
- # $FreeBSD: src/lib/libufs/Makefile,v 1.10 2003/08/18 15:25:39 obrien Exp $
+Index: ufsutils/libufs/Makefile
+===================================================================
+--- ufsutils.orig/libufs/Makefile 2007-12-07 19:29:33.857065000 +0100
++++ ufsutils/libufs/Makefile 2007-12-07 19:30:26.000000000 +0100
+@@ -1,26 +1,15 @@
+ # $FreeBSD: src/lib/libufs/Makefile,v 1.14 2006/10/31 21:21:48 pjd Exp $
--LIB= ufs
+ LIB= ufs
-SHLIBDIR?= /lib
++SHLIB_MAJOR= 2
+
-SRCS= block.c cgroup.c inode.c sblock.c type.c
--INCS= libufs.h
++LIBSRCS= block.c cgroup.c inode.c sblock.c type.c ../libport/strlcpy.c
+ INCS= libufs.h
+
-MAN= bread.3 cgread.3 libufs.3 sbread.3 ufs_disk_close.3
-MLINKS+= bread.3 bwrite.3
-MLINKS+= cgread.3 cgread1.3
+-MLINKS+= cgread.3 cgwrite1.3
-MLINKS+= sbread.3 sbwrite.3
-MLINKS+= ufs_disk_close.3 ufs_disk_fillout.3
-MLINKS+= ufs_disk_close.3 ufs_disk_fillout_blank.3
-MLINKS+= ufs_disk_close.3 ufs_disk_write.3
--CFLAGS+= -I${.CURDIR} -D_LIBUFS
--.if defined(LIBUFS_DEBUG)
--CFLAGS+= -D_LIBUFS_DEBUGGING
--.endif
--WARNS?= 2
-+LIB = ufs
-+SHLIB_MAJOR = 2
-+LIBSRCS = block.c cgroup.c inode.c sblock.c type.c
-+INCS = libufs.h
-+
-+ALL_CFLAGS = -D_LIBUFS
++ALL_CFLAGS+= -D_LIBUFS
+ifdef LIBUFS_DEBUG
-+ALL_CFLAGS += -D_LIBUFS_DEBUGGING
++ALL_CFLAGS+= -D_LIBUFS_DEBUGGING
+endif
-+
+INCLUDES = -I.
-+
-+include ../Makefile.common
+-WARNS?= 2
+-
+-CFLAGS+= -D_LIBUFS
+-.if defined(LIBUFS_DEBUG)
+-CFLAGS+= -D_LIBUFS_DEBUGGING
+-.endif
+-CFLAGS+= -I${.CURDIR}
+-
-.include <bsd.lib.mk>
++include ../Makefile.common
Modified: trunk/ufsutils/debian/patches/02_bsdlabel.ufs.patch
===================================================================
--- trunk/ufsutils/debian/patches/02_bsdlabel.ufs.patch 2007-12-07 12:18:57 UTC (rev 2061)
+++ trunk/ufsutils/debian/patches/02_bsdlabel.ufs.patch 2007-12-07 18:32:38 UTC (rev 2062)
@@ -1,8 +1,9 @@
#DPATCHLEVEL=1
-diff -Naur ufsutils.orig/bsdlabel/bsdlabel.c ufsutils.new/bsdlabel/bsdlabel.c
---- ufsutils.orig/bsdlabel/bsdlabel.c 2004-03-31 01:15:03.000000000 +0200
-+++ ufsutils.new/bsdlabel/bsdlabel.c 2004-05-21 05:18:50.000000000 +0200
-@@ -60,7 +62,9 @@
+Index: ufsutils/bsdlabel/bsdlabel.c
+===================================================================
+--- ufsutils.orig/bsdlabel/bsdlabel.c 2006-10-20 15:10:27.000000000 +0200
++++ ufsutils/bsdlabel/bsdlabel.c 2007-12-07 19:02:08.000000000 +0100
+@@ -60,7 +60,9 @@
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/wait.h>
@@ -12,7 +13,7 @@
#define DKTYPENAMES
#define FSTYPENAMES
#include <sys/disklabel.h>
-@@ -68,7 +72,7 @@
+@@ -68,7 +70,7 @@
#include <unistd.h>
#include <string.h>
#include <stdio.h>
@@ -21,7 +22,7 @@
#include <stdlib.h>
#include <signal.h>
#include <stdarg.h>
-@@ -473,8 +477,12 @@
+@@ -476,8 +478,12 @@
err(1, specname);
if (is_file)
get_file_parms(f);
@@ -33,8 +34,8 @@
+#endif
err(4, "cannot get disk geometry");
}
- (void)lseek(f, (off_t)0, SEEK_SET);
-@@ -659,10 +667,12 @@
+ if (mediasize > (off_t)0xffffffff * secsize)
+@@ -665,10 +671,12 @@
omask = sigblock(sigmask(SIGINT)|sigmask(SIGQUIT)|sigmask(SIGHUP));
while ((pid = fork()) < 0) {
@@ -47,7 +48,7 @@
if (errno != EAGAIN) {
warn("fork");
return(0);
-@@ -1357,8 +1367,12 @@
+@@ -1426,8 +1434,12 @@
if (is_file)
get_file_parms(f);
@@ -60,7 +61,7 @@
close (f);
return (NULL);
}
-@@ -1374,13 +1388,18 @@
+@@ -1443,13 +1455,18 @@
* to get any good ideas from the device, construct something
* which is IBM-PC friendly.
*/
@@ -80,41 +81,29 @@
loclab.d_ntracks = 1;
else if (loclab.d_secperunit <= 63*16*1024)
loclab.d_ntracks = 16;
-diff -Naur ufsutils.orig/bsdlabel/Makefile ufsutils.new/bsdlabel/Makefile
---- ufsutils.orig/bsdlabel/Makefile 2004-01-11 10:11:10.000000000 +0100
-+++ ufsutils.new/bsdlabel/Makefile 2004-05-21 05:10:36.000000000 +0200
-@@ -1,26 +1,25 @@
- # @(#)Makefile 8.2 (Berkeley) 3/17/94
- # $FreeBSD: src/sbin/bsdlabel/Makefile,v 1.19 2004/01/11 09:11:10 nyan Exp $
+Index: ufsutils/bsdlabel/Makefile
+===================================================================
+--- ufsutils.orig/bsdlabel/Makefile 2006-08-22 09:51:09.000000000 +0200
++++ ufsutils/bsdlabel/Makefile 2007-12-07 19:05:39.000000000 +0100
+@@ -4,14 +4,8 @@
+ .PATH: ${.CURDIR}/../../sys/geom
--.PATH: ${.CURDIR}/../../sys/geom
-
--PROG= bsdlabel
+ PROG= bsdlabel
-SRCS= bsdlabel.c geom_bsd_enc.c
-#MAN= bsdlabel.5
-MAN+= bsdlabel.8
-
--.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "alpha" || \
-- ${MACHINE_ARCH} == "amd64"
+-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
-LINKS= ${BINDIR}/bsdlabel ${BINDIR}/disklabel
-MLINKS= bsdlabel.8 disklabel.8
-.endif
-+PROG = bsdlabel
-+SRCS = bsdlabel.c ../libdisklabel/geom_bsd_enc.c
++SRCS= bsdlabel.c ../libdisklabel/geom_bsd_enc.c
+MAN = bsdlabel.8:bsdlabel.8
-+
-+#if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "alpha" || \
-+# ${MACHINE_ARCH} == "amd64"
-+#LINKS = ${BINDIR}/bsdlabel ${BINDIR}/disklabel
-+#MLINKS = bsdlabel.8 disklabel.8
-+#endif
--DPADD= ${LIBGEOM}
--LDADD= -lgeom
--
--.include <bsd.prog.mk>
-+DPADD = ${LIBGEOM}
-+LDADD = -lgeom
+ DPADD= ${LIBGEOM}
+ LDADD= -lgeom
+@@ -19,7 +13,9 @@
+ .include <bsd.prog.mk>
test: ${PROG}
- sh ${.CURDIR}/runtest.sh
@@ -125,4 +114,3 @@
+ sh -x ${CURDIR}/runtest.sh
+
+include ../Makefile.common
-+
Modified: trunk/ufsutils/debian/patches/02_fsck.ufs.patch
===================================================================
--- trunk/ufsutils/debian/patches/02_fsck.ufs.patch 2007-12-07 12:18:57 UTC (rev 2061)
+++ trunk/ufsutils/debian/patches/02_fsck.ufs.patch 2007-12-07 18:32:38 UTC (rev 2062)
@@ -1,8 +1,8 @@
#DPATCHLEVEL=1
-Index: uf-a/fsck.ufs/ea.c
+Index: ufsutils/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
+--- ufsutils.orig/fsck.ufs/ea.c 2007-12-07 20:12:55.802672000 +0100
++++ ufsutils/fsck.ufs/ea.c 2007-12-07 20:13:27.000000000 +0100
@@ -38,7 +38,7 @@
#include <sys/param.h>
@@ -12,12 +12,12 @@
#include <ufs/ufs/dinode.h>
#include <ufs/ufs/dir.h>
-Index: uf-a/fsck.ufs/fsck_ffs.8
+Index: ufsutils/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
+--- ufsutils.orig/fsck.ufs/fsck_ffs.8 2007-12-07 20:12:55.826237000 +0100
++++ ufsutils/fsck.ufs/fsck_ffs.8 2007-12-07 20:13:27.000000000 +0100
@@ -30,11 +30,11 @@
- .\" $FreeBSD: src/sbin/fsck_ffs/fsck_ffs.8,v 1.33.2.1 2005/09/24 01:59:36 keramida Exp $
+ .\" $FreeBSD: src/sbin/fsck_ffs/fsck_ffs.8,v 1.34 2005/09/20 08:02:38 delphij Exp $
.\"
.Dd April 24, 2001
-.Dt FSCK_FFS 8
@@ -37,10 +37,10 @@
.Xr fsdb 8 ,
-.Xr newfs 8 ,
.Xr reboot 8
-Index: uf-a/fsck.ufs/fsutil.c
+Index: ufsutils/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
+--- ufsutils.orig/fsck.ufs/fsutil.c 2007-12-07 20:12:55.849909000 +0100
++++ ufsutils/fsck.ufs/fsutil.c 2007-12-07 20:13:27.000000000 +0100
@@ -38,7 +38,9 @@
#include <sys/param.h>
#include <sys/time.h>
@@ -121,12 +121,12 @@
ckfini(0);
exit(EEXIT);
}
-Index: uf-a/fsck.ufs/inode.c
+Index: ufsutils/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
+--- ufsutils.orig/fsck.ufs/inode.c 2007-12-07 20:12:55.873602000 +0100
++++ ufsutils/fsck.ufs/inode.c 2007-12-07 20:13:27.000000000 +0100
@@ -36,7 +36,7 @@
- __FBSDID("$FreeBSD: src/sbin/fsck_ffs/inode.c,v 1.37 2004/10/08 20:44:47 truckman Exp $");
+ __FBSDID("$FreeBSD: src/sbin/fsck_ffs/inode.c,v 1.38 2006/10/31 22:06:56 pjd Exp $");
#include <sys/param.h>
-#include <sys/stdint.h>
@@ -142,11 +142,11 @@
#include "fsck.h"
-Index: uf-a/fsck.ufs/main.c
+Index: ufsutils/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 @@
+--- ufsutils.orig/fsck.ufs/main.c 2007-12-07 20:12:55.898546000 +0100
++++ ufsutils/fsck.ufs/main.c 2007-12-07 20:14:13.000000000 +0100
+@@ -45,9 +45,16 @@
#include <sys/stat.h>
#include <sys/file.h>
#include <sys/time.h>
@@ -160,37 +160,36 @@
+#ifdef HAVE_BSD_SYSCTL
#include <sys/sysctl.h>
+#endif
+ #include <sys/uio.h>
#include <sys/disklabel.h>
- #include <ufs/ufs/dinode.h>
-+#ifdef HAVE_BSD_MOUNT
- #include <ufs/ufs/ufsmount.h>
-+#endif
- #include <ufs/ffs/fs.h>
-
- #include <err.h>
-@@ -59,15 +68,19 @@
+@@ -58,18 +65,24 @@
+ #include <errno.h>
#include <fstab.h>
#include <grp.h>
++#if 0
+ #include <mntopts.h>
++#endif
#include <paths.h>
-+#include <time.h>
#include <stdint.h>
#include <string.h>
++#include <time.h>
+#include <signal.h>
#include "fsck.h"
-static void usage(void) __dead2;
-+static void usage(char *progname) __dead2;
++static void usage(char *progname);
static int argtoi(int flag, const char *req, const char *str, int base);
static int checkfilesys(char *filesys);
+ static int chkdoreload(struct statfs *mntp);
+#ifdef HAVE_BSD_STATFS
static struct statfs *getmntpt(const char *);
+#endif
int
main(int argc, char *argv[])
-@@ -76,10 +89,11 @@
+@@ -78,10 +91,11 @@
struct rlimit rlimit;
struct itimerval itimerval;
int ret = 0;
@@ -203,7 +202,7 @@
switch (ch) {
case 'b':
skipclean = 0;
-@@ -123,6 +137,7 @@
+@@ -125,6 +139,7 @@
yflag = 0;
break;
@@ -211,7 +210,7 @@
case 'p':
preen++;
break;
-@@ -133,20 +148,22 @@
+@@ -135,20 +150,22 @@
break;
default:
@@ -236,23 +235,18 @@
if (bkgrdflag) {
signal(SIGALRM, alarmhandler);
itimerval.it_interval.tv_sec = 5;
-@@ -191,11 +208,15 @@
- checkfilesys(char *filesys)
- {
+@@ -195,8 +212,10 @@
ufs2_daddr_t n_ffree, n_bfree;
-+#if HAVE_BSD_MOUNT
- struct ufs_args args;
-+#endif
struct dups *dp;
struct statfs *mntp;
-+#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;
- ino_t files;
-@@ -209,10 +230,12 @@
+ struct iovec *iov;
+ char errmsg[255];
+@@ -218,10 +237,12 @@
* if it is listed among the mounted file systems. Failing that
* check to see if it is listed in /etc/fstab.
*/
@@ -265,7 +259,7 @@
filesys = blockcheck(filesys);
/*
* If -F flag specified, check to see whether a background check
-@@ -230,8 +253,10 @@
+@@ -239,8 +260,10 @@
if ((sblock.fs_flags & FS_DOSOFTDEP) == 0)
exit(5); /* Not running soft updates */
size = MIBSIZE;
@@ -276,7 +270,7 @@
if ((mntp == NULL && sblock.fs_clean == 1) ||
(mntp != NULL && (sblock.fs_flags & FS_UNCLEAN) == 0))
exit(7); /* Filesystem clean, report it now */
-@@ -244,6 +269,7 @@
+@@ -278,6 +301,7 @@
* return created snapshot file
* if not found, clear bkgrdflag and proceed with normal fsck
*/
@@ -284,7 +278,7 @@
if (bkgrdflag) {
if (mntp == NULL) {
bkgrdflag = 0;
-@@ -320,6 +346,7 @@
+@@ -365,6 +389,7 @@
filesys = snapname;
}
}
@@ -292,7 +286,7 @@
switch (setup(filesys)) {
case 0:
-@@ -327,7 +354,9 @@
+@@ -372,7 +397,9 @@
pfatal("CAN'T CHECK FILE SYSTEM.");
return (0);
case -1:
@@ -302,7 +296,7 @@
pwarn("clean, %ld free ", (long)(sblock.fs_cstotal.cs_nffree +
sblock.fs_frag * sblock.fs_cstotal.cs_nbfree));
printf("(%lld frags, %lld blocks, %.1f%% fragmentation)\n",
-@@ -347,8 +376,10 @@
+@@ -392,8 +419,10 @@
*/
if (preen == 0) {
printf("** Last Mounted on %s\n", sblock.fs_fsmnt);
@@ -313,7 +307,7 @@
printf("** Phase 1 - Check Blocks and Sizes\n");
}
pass1();
-@@ -447,8 +478,13 @@
+@@ -492,8 +521,13 @@
/*
* Check to see if the file system is mounted read-write.
*/
@@ -327,52 +321,34 @@
ckfini(resolved);
for (cylno = 0; cylno < sblock.fs_ncg; cylno++)
-@@ -466,6 +502,9 @@
- * it unless it is read-write, so we can continue using it
- * as safely as possible.
- */
+@@ -536,6 +570,8 @@
+ * it unless it is read-write, so we can continue using it
+ * as safely as possible.
+ */
+#if HAVE_BSD_STATFS && HAVE_BSD_MOUNT
-+ int ret;
+
- if (mntp->f_flags & MNT_RDONLY) {
- args.fspec = 0;
- args.export.ex_flags = 0;
-@@ -477,6 +516,20 @@
- pwarn("mount reload of '%s' failed: %s\n\n",
- mntp->f_mntonname, strerror(errno));
- }
-+//#else
+ if (mntp->f_flags & MNT_RDONLY) {
+ /*
+ * XXX: Need to kick out MNT_ROOTFS until we fix
+@@ -558,8 +594,12 @@
+ return (1);
+ }
+ return (0);
++#else
+#warning "FIXME: use linux mount call"
-+ if (mntp->f_flag & ST_RDONLY) {
-+ args.fspec = 0;
-+ args.export.ex_flags = 0;
-+ args.export.ex_root = 0;
-+ ret = mount("ufs", mntp->f_mntonname,
-+ mntp->f_flag | MNT_UPDATE | MNT_RELOAD, &args);
-+ if (ret == 0)
-+ return (0);
-+ pwarn("mount reload of '%s' failed: %s\n\n",
-+ mntp->f_mntonname, strerror(errno));
-+ }
+#endif
- if (!fsmodified)
- return (0);
- if (!preen)
-@@ -487,6 +540,7 @@
- return (0);
}
+#if HAVE_BSD_STATFS
/*
* Get the mount point information for name.
*/
-@@ -526,13 +580,14 @@
+@@ -599,13 +639,14 @@
statfsp = NULL;
return (statfsp);
}
--
+#endif
-+
+
static void
-usage(void)
+usage(char *progname)
@@ -384,15 +360,15 @@
+ progname);
exit(1);
}
-Index: uf-a/fsck.ufs/pass1.c
+Index: ufsutils/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
+--- ufsutils.orig/fsck.ufs/pass1.c 2007-12-07 20:12:55.922248000 +0100
++++ ufsutils/fsck.ufs/pass1.c 2007-12-07 20:13:27.000000000 +0100
@@ -317,9 +317,11 @@
inoinfo(inumber)->ino_type = IFTODT(mode);
badblk = dupblk = 0;
idesc->id_number = inumber;
-+#if HAVE_UFS_SNAPSHOTS
++#if HAVE_UFS_SNAPSHOT
if (DIP(dp, di_flags) & SF_SNAPSHOT)
idesc->id_type = SNAP;
else
@@ -400,12 +376,12 @@
idesc->id_type = ADDR;
(void)ckinode(dp, idesc);
if (sblock.fs_magic == FS_UFS2_MAGIC && dp->dp2.di_extsize > 0) {
-Index: uf-a/fsck.ufs/setup.c
+Index: ufsutils/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
+--- ufsutils.orig/fsck.ufs/setup.c 2007-12-07 20:12:55.945794000 +0100
++++ ufsutils/fsck.ufs/setup.c 2007-12-07 20:13:27.000000000 +0100
@@ -36,11 +36,14 @@
- __FBSDID("$FreeBSD: src/sbin/fsck_ffs/setup.c,v 1.49 2005/03/07 08:42:49 delphij Exp $");
+ __FBSDID("$FreeBSD: src/sbin/fsck_ffs/setup.c,v 1.50 2006/10/31 22:06:56 pjd Exp $");
#include <sys/param.h>
+#include <sys/types.h>
@@ -431,7 +407,7 @@
}
return (0);
}
-+#if HAVE_UFS_SNAPSHOTS
++#if HAVE_UFS_SNAPSHOT
if ((statb.st_mode & S_IFMT) != S_IFCHR &&
(statb.st_mode & S_IFMT) != S_IFBLK) {
if (bkgrdflag != 0 && (statb.st_flags & SF_SNAPSHOT) == 0) {
@@ -472,24 +448,24 @@
static struct disklabel *
getdisklabel(char *s, int fd)
{
-+#ifdef HAVE_BSD_DISKLABELS
++#ifdef HAVE_BSD_DISKLABEL
static struct disklabel lab;
if (ioctl(fd, DIOCGDINFO, (char *)&lab) < 0) {
if (s == NULL)
+#endif
return ((struct disklabel *)NULL);
-+#ifdef HAVE_BSD_DISKLABELS
++#ifdef HAVE_BSD_DISKLABEL
pwarn("ioctl (GCINFO): %s\n", strerror(errno));
errx(EEXIT, "%s: can't read disk label", s);
}
return (&lab);
+#endif
}
-Index: uf-a/fsck.ufs/utilities.c
+Index: ufsutils/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
+--- ufsutils.orig/fsck.ufs/utilities.c 2007-12-07 20:12:55.969243000 +0100
++++ ufsutils/fsck.ufs/utilities.c 2007-12-07 20:13:27.000000000 +0100
@@ -108,14 +108,16 @@
return (origname);
}
@@ -509,12 +485,12 @@
{
got_sigalarm = 1;
}
-Index: uf-a/fsck.ufs/Makefile
+Index: ufsutils/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.16 2004/09/01 08:26:39 scottl Exp $
+--- ufsutils.orig/fsck.ufs/Makefile 2007-12-07 20:12:55.999974000 +0100
++++ ufsutils/fsck.ufs/Makefile 2007-12-07 20:14:33.000000000 +0100
+@@ -1,19 +1,17 @@
+ # $FreeBSD: src/sbin/fsck_ffs/Makefile,v 1.18 2007/09/19 01:24:19 rodrigc Exp $
# @(#)Makefile 8.2 (Berkeley) 4/27/95
-PROG= fsck_ffs
@@ -523,23 +499,24 @@
-MAN= fsck_ffs.8
-MLINKS= fsck_ffs.8 fsck_ufs.8 fsck_ffs.8 fsck_4.2bsd.8
-SRCS= dir.c ea.c fsutil.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c \
-- pass4.c pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c
+- pass4.c pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c gjournal.c \
+- getmntopts.c
+-DPADD= ${LIBUFS}
+-LDADD= -lufs
-WARNS?= 2
--CFLAGS+= -I${.CURDIR}
+-CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mount
+PROG = fsck.ufs
+LIB = $(PROG)
+LIB_type = static
+SRCS = main.c
+MAN = fsck_ffs.8:fsck.ufs.8
+UFS_SRCS = ../include/ufs/ffs/ffs_subr.c ../include/ufs/ffs/ffs_tables.c
-+LIBSRCS = \
-+ dir.c ea.c fsutil.c inode.c pass1.c pass1b.c pass2.c pass3.c pass4.c \
-+ pass5.c setup.c utilities.c $(UFS_SRCS)
-+WARNS = 2
++LIBSRCS= dir.c ea.c fsutil.c inode.c pass1.c pass1b.c pass2.c pass3.c \
++ pass4.c pass5.c setup.c utilities.c $(UFS_SRCS) gjournal.c
--.PATH: ${.CURDIR}/../../sys/ufs/ffs
+-.PATH: ${.CURDIR}/../../sys/ufs/ffs ${.CURDIR}/../mount
+LDADD = -L../libport -lport -L. -l$(LIB) -L../libufs -lufs
-+INCLUDES = -I.
++INCLUDES = -I. -I../libufs
+
+include ../Makefile.common
Added: trunk/ufsutils/debian/patches/series
===================================================================
--- trunk/ufsutils/debian/patches/series (rev 0)
+++ trunk/ufsutils/debian/patches/series 2007-12-07 18:32:38 UTC (rev 2062)
@@ -0,0 +1,17 @@
+00_libport.patch
+00_mount.patch
+00_param.patch
+01_libdisklabel.patch
+01_libufs.patch
+02_badsect.ufs.patch
+02_bsdlabel.ufs.patch
+02_dump.ufs.patch
+02_dumpfs.ufs.patch
+02_ffsinfo.patch
+02_fsck.ufs.patch
+02_fsdb.ufs.patch
+02_growfs.ufs.patch
+02_mkfs.ufs.patch
+02_tunefs.ufs.patch
+03_ufsmount.patch
+99_makefiles.patch
Modified: trunk/ufsutils/debian/rules
===================================================================
--- trunk/ufsutils/debian/rules 2007-12-07 12:18:57 UTC (rev 2061)
+++ trunk/ufsutils/debian/rules 2007-12-07 18:32:38 UTC (rev 2062)
@@ -21,6 +21,12 @@
CFLAGS += -D_FILE_OFFSET_BITS=64
endif
+# on GNU/kFreeBSD every feature should be available
+ifeq (kfreebsd,$(DEB_HOST_ARCH_OS))
+CFLAGS += -DHAVE_BSD_ERRNO -DHAVE_BSD_SIGNALS -DHAVE_BSD_STATFS
+# not yet: -DHAVE_BSD_DISKLABEL -DHAVE_BSD_MOUNT -DHAVE_UFS_SNAPSHOT -DHAVE_BSD_SYSCTL
+endif
+
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
@@ -30,23 +36,25 @@
INSTALL_PROGRAM += -s
endif
-include debian/patch.mk
-
build: build-stamp
-build-stamp: patch
+build-stamp:
dh_testdir
-
+
+ QUILT_PATCHES=$(CURDIR)/debian/patches quilt push -a || test $$? = 2
+
CFLAGS="$(CFLAGS)" $(MAKE)
touch build-stamp
-clean: unpatch
+clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
-$(MAKE) clean
-
+
+ QUILT_PATCHES=$(CURDIR)/debian/patches quilt pop -a || test $$? = 2
+
dh_clean
install: build
Modified: trunk/ufsutils/debian/upstream.sh
===================================================================
--- trunk/ufsutils/debian/upstream.sh 2007-12-07 12:18:57 UTC (rev 2061)
+++ trunk/ufsutils/debian/upstream.sh 2007-12-07 18:32:38 UTC (rev 2062)
@@ -1,8 +1,9 @@
#!/bin/bash
-cvsroot=":ext:anoncvs at anoncvs.fr.freebsd.org:/home/ncvs"
-RELENG=RELENG_6_2_0_RELEASE
-#RELENG=HEAD
+ANONCVS=anoncvs at anoncvs.fr.freebsd.org:/home/ncvs
+RELENG=RELENG_6_3_0_RELEASE
+RELENG=RELENG_6_3
+RELENG=RELENG_7
srcs=" \
src/sbin/badsect:badsect.ufs \
@@ -61,7 +62,7 @@
# Note: Does not use co -d because freebsd cvs server has
# a fascist connection limit (2)
-cvs -z3 -d$cvsroot co -r $RELENG $repos
+cvs -z3 -d $ANONCVS 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
More information about the Glibc-bsd-commits
mailing list