[Glibc-bsd-commits] r1346 - in trunk/freebsd-utils: . debian
debian/patches
Robert Millan
rmh at costa.debian.org
Sat Mar 18 13:14:19 UTC 2006
Author: rmh
Date: 2006-03-18 13:14:19 +0000 (Sat, 18 Mar 2006)
New Revision: 1346
Added:
trunk/freebsd-utils/debian/patches/001_mount.diff
trunk/freebsd-utils/debian/patches/002_mount_noforce_fstab.diff
trunk/freebsd-utils/debian/patches/003_mount_syspath_weirdo.diff
trunk/freebsd-utils/debian/patches/005_mount_no_fsid_val.diff
Modified:
trunk/freebsd-utils/debian/rules
trunk/freebsd-utils/fetch
Log:
Add a few patches. Add src/usr.sbin/rpc.umntall to fetch list.
Added: trunk/freebsd-utils/debian/patches/001_mount.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/001_mount.diff 2006-03-18 13:00:15 UTC (rev 1345)
+++ trunk/freebsd-utils/debian/patches/001_mount.diff 2006-03-18 13:14:19 UTC (rev 1346)
@@ -0,0 +1,30 @@
+--- src/sbin/mount/mount_ufs.c~ 2006-03-18 13:51:27.000000000 +0100
++++ src/sbin/mount/mount_ufs.c 2006-03-18 13:52:39.000000000 +0100
+@@ -50,6 +50,8 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+
++#include <bsd/getopt.h>
++
+ #include <ufs/ufs/ufsmount.h>
+
+ #include "extern.h"
+--- src/sbin/mount/mount_ufs.c.old 2006-03-18 13:54:12.000000000 +0100
++++ src/sbin/mount/mount_ufs.c 2006-03-18 13:57:43.000000000 +0100
+@@ -43,6 +43,7 @@
+
+ #include <sys/param.h>
+ #include <sys/mount.h>
++#include <sys/syscall.h>
+
+ #include <err.h>
+ #include <errno.h>
+@@ -105,7 +106,7 @@
+ else
+ args.export.ex_flags = 0;
+
+- if (mount("ufs", fs_name, mntflags, &args) < 0) {
++ if (syscall (SYS_mount, "ufs", fs_name, mntflags, &args) < 0) {
+ switch (errno) {
+ case EMFILE:
+ warnx("%s on %s: mount table full",
Added: trunk/freebsd-utils/debian/patches/002_mount_noforce_fstab.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/002_mount_noforce_fstab.diff 2006-03-18 13:00:15 UTC (rev 1345)
+++ trunk/freebsd-utils/debian/patches/002_mount_noforce_fstab.diff 2006-03-18 13:14:19 UTC (rev 1346)
@@ -0,0 +1,21 @@
+--- src/sbin/mount/mount.c~ 2006-03-18 13:58:00.000000000 +0100
++++ src/sbin/mount/mount.c 2006-03-18 14:02:35.000000000 +0100
+@@ -138,7 +138,7 @@
+ options = NULL;
+ vfslist = NULL;
+ vfstype = "ufs";
+- while ((ch = getopt(argc, argv, "adF:fo:prwt:uv")) != -1)
++ while ((ch = getopt(argc, argv, "ad:fo:prwt:uv")) != -1)
+ switch (ch) {
+ case 'a':
+ all = 1;
+@@ -146,9 +146,6 @@
+ case 'd':
+ debug = 1;
+ break;
+- case 'F':
+- setfstab(optarg);
+- break;
+ case 'f':
+ init_flags |= MNT_FORCE;
+ break;
Added: trunk/freebsd-utils/debian/patches/003_mount_syspath_weirdo.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/003_mount_syspath_weirdo.diff 2006-03-18 13:00:15 UTC (rev 1345)
+++ trunk/freebsd-utils/debian/patches/003_mount_syspath_weirdo.diff 2006-03-18 13:14:19 UTC (rev 1346)
@@ -0,0 +1,15 @@
+--- src/sbin/mount/mount.c~ 2006-03-18 14:06:22.000000000 +0100
++++ src/sbin/mount/mount.c 2006-03-18 14:07:15.000000000 +0100
+@@ -461,10 +461,9 @@
+
+ /* Go find an executable. */
+ (void)snprintf(execname, sizeof(execname), "mount_%s", vfstype);
+- execvP(execname, _PATH_SYSPATH, (char * const *)argv);
++ execvp(execname, (char * const *)argv);
+ if (errno == ENOENT) {
+- warn("exec mount_%s not found in %s", vfstype,
+- _PATH_SYSPATH);
++ warn("exec mount_%s not found", vfstype);
+ }
+ exit(1);
+ /* NOTREACHED */
Added: trunk/freebsd-utils/debian/patches/005_mount_no_fsid_val.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/005_mount_no_fsid_val.diff 2006-03-18 13:00:15 UTC (rev 1345)
+++ trunk/freebsd-utils/debian/patches/005_mount_no_fsid_val.diff 2006-03-18 13:14:19 UTC (rev 1346)
@@ -0,0 +1,45 @@
+--- src/sbin/mount/mount.c~ 2006-03-18 13:50:21.000000000 +0100
++++ src/sbin/mount/mount.c 2006-03-18 13:51:06.000000000 +0100
+@@ -540,11 +540,13 @@
+ (void)printf(", reads: sync %ju async %ju",
+ (uintmax_t)sfp->f_syncreads,
+ (uintmax_t)sfp->f_asyncreads);
++#ifdef __FreeBSD__
+ if (sfp->f_fsid.val[0] != 0 || sfp->f_fsid.val[1] != 0) {
+ printf(", fsid ");
+ for (i = 0; i < sizeof(sfp->f_fsid); i++)
+ printf("%02x", ((u_char *)&sfp->f_fsid)[i]);
+ }
++#endif
+ }
+ (void)printf(")\n");
+ }
+--- src/sbin/umount/umount.c~ 2006-03-18 14:08:59.000000000 +0100
++++ src/sbin/umount/umount.c 2006-03-18 14:11:05.000000000 +0100
+@@ -349,24 +349,12 @@
+
+ if (!namematch(ai))
+ return (1);
+- /* First try to unmount using the file system ID. */
+- snprintf(fsidbuf, sizeof(fsidbuf), "FSID:%d:%d", sfs->f_fsid.val[0],
+- sfs->f_fsid.val[1]);
+- if (unmount(fsidbuf, fflag | MNT_BYFSID) != 0) {
+- /* XXX, non-root users get a zero fsid, so don't warn. */
+- if (errno != ENOENT || sfs->f_fsid.val[0] != 0 ||
+- sfs->f_fsid.val[1] != 0)
+- warn("unmount of %s failed", sfs->f_mntonname);
+- if (errno != ENOENT)
+- return (1);
+- /* Compatibility for old kernels. */
+- if (sfs->f_fsid.val[0] != 0 || sfs->f_fsid.val[1] != 0)
+- warnx("retrying using path instead of file system ID");
++
+ if (unmount(sfs->f_mntonname, fflag) != 0) {
+ warn("unmount of %s failed", sfs->f_mntonname);
+ return (1);
+ }
+- }
++
+ /* Mark this this file system as unmounted. */
+ getmntentry(NULL, NULL, &sfs->f_fsid, REMOVE);
+ if (vflag)
Modified: trunk/freebsd-utils/debian/rules
===================================================================
--- trunk/freebsd-utils/debian/rules 2006-03-18 13:00:15 UTC (rev 1345)
+++ trunk/freebsd-utils/debian/rules 2006-03-18 13:14:19 UTC (rev 1346)
@@ -21,7 +21,6 @@
-e "/^__FBSDID/d" -e "s,<sys/queue.h>,<bsd/queue.h>,g" -e "s/^LDADD=/LDADD+=/g" \
-e "/[ \t]*__dead2[ \t]*/d" \
-e "s/getline/bsd_&/g" \
- -e "s,_PATH_SYSPATH,\"/sbin:/usr/sbin\",g" \
; done)
set -e ; for i in $(dirs) ; do \
$(PMAKE) -C $(DEB_SRCDIR)/sbin/$$i ; \
Modified: trunk/freebsd-utils/fetch
===================================================================
--- trunk/freebsd-utils/fetch 2006-03-18 13:00:15 UTC (rev 1345)
+++ trunk/freebsd-utils/fetch 2006-03-18 13:14:19 UTC (rev 1346)
@@ -14,7 +14,7 @@
for i in \
src/sbin/dmesg \
- src/sbin/{,u}mount \
+ src/sbin/{,u}mount src/usr.sbin/rpc.umntall \
src/sbin/swapon \
src/sbin/sysctl \
; do
More information about the Glibc-bsd-commits
mailing list