[Glibc-bsd-commits] r1350 - trunk/freebsd-utils/debian/patches
Robert Millan
rmh at costa.debian.org
Sat Mar 18 14:59:09 UTC 2006
Author: rmh
Date: 2006-03-18 14:59:08 +0000 (Sat, 18 Mar 2006)
New Revision: 1350
Added:
trunk/freebsd-utils/debian/patches/004_umount_missing_getvfsbyname.diff
trunk/freebsd-utils/debian/patches/006_unmount_syscall.diff
trunk/freebsd-utils/debian/patches/007_rpc_auth.diff
trunk/freebsd-utils/debian/patches/008_swapon.diff
Log:
Add a few more patches.
Added: trunk/freebsd-utils/debian/patches/004_umount_missing_getvfsbyname.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/004_umount_missing_getvfsbyname.diff 2006-03-18 14:37:39 UTC (rev 1349)
+++ trunk/freebsd-utils/debian/patches/004_umount_missing_getvfsbyname.diff 2006-03-18 14:59:08 UTC (rev 1350)
@@ -0,0 +1,12 @@
+--- src/sbin/umount/umount.c~ 2006-03-18 14:22:12.000000000 +0100
++++ src/sbin/umount/umount.c 2006-03-18 14:22:55.000000000 +0100
+@@ -197,9 +197,6 @@
+ strcmp(fs->fs_type, FSTAB_RO) &&
+ strcmp(fs->fs_type, FSTAB_RQ))
+ continue;
+- /* Ignore unknown file system types. */
+- if (getvfsbyname(fs->fs_vfstype, &vfc) == -1)
+- continue;
+ if (checkvfsname(fs->fs_vfstype, typelist))
+ continue;
+
Added: trunk/freebsd-utils/debian/patches/006_unmount_syscall.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/006_unmount_syscall.diff 2006-03-18 14:37:39 UTC (rev 1349)
+++ trunk/freebsd-utils/debian/patches/006_unmount_syscall.diff 2006-03-18 14:59:08 UTC (rev 1350)
@@ -0,0 +1,19 @@
+--- src/sbin/umount/umount.c~ 2006-03-18 14:21:27.000000000 +0100
++++ src/sbin/umount/umount.c 2006-03-18 14:22:12.000000000 +0100
+@@ -45,6 +45,7 @@
+ #include <sys/mount.h>
+ #include <sys/socket.h>
+ #include <sys/stat.h>
++#include <sys/syscall.h>
+
+ #include <netdb.h>
+ #include <rpc/rpc.h>
+@@ -349,7 +350,7 @@
+ if (!namematch(ai))
+ return (1);
+
+- if (unmount(sfs->f_mntonname, fflag) != 0) {
++ if (syscall (SYS_unmount, sfs->f_mntonname, fflag) != 0) {
+ warn("unmount of %s failed", sfs->f_mntonname);
+ return (1);
+ }
Added: trunk/freebsd-utils/debian/patches/007_rpc_auth.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/007_rpc_auth.diff 2006-03-18 14:37:39 UTC (rev 1349)
+++ trunk/freebsd-utils/debian/patches/007_rpc_auth.diff 2006-03-18 14:59:08 UTC (rev 1350)
@@ -0,0 +1,22 @@
+--- src/sbin/umount/umount.c.old 2006-03-18 14:29:08.000000000 +0100
++++ src/sbin/umount/umount.c 2006-03-18 14:29:20.000000000 +0100
+@@ -368,7 +369,7 @@
+ clnt_spcreateerror("RPCPROG_MNT"));
+ return (1);
+ }
+- clp->cl_auth = authsys_create_default();
++ clp->cl_auth = authunix_create_default();
+ try.tv_sec = 20;
+ try.tv_usec = 0;
+ clnt_stat = clnt_call(clp, RPCMNT_UMOUNT, (xdrproc_t)xdr_dir,
+--- src/usr.sbin/rpc.umntall/rpc.umntall.c~ 2006-03-18 14:29:44.000000000 +0100
++++ src/usr.sbin/rpc.umntall/rpc.umntall.c 2006-03-18 14:30:09.000000000 +0100
+@@ -206,7 +206,7 @@
+ warnx("%s: %s", hostname, clnt_spcreateerror("RPCPROG_MNT"));
+ return (0);
+ }
+- clp->cl_auth = authsys_create_default();
++ clp->cl_auth = authunix_create_default();
+ try.tv_sec = 3;
+ try.tv_usec = 0;
+ clnt_stat = clnt_call(clp, RPCMNT_UMOUNT, (xdrproc_t)xdr_dir, dirp,
Added: trunk/freebsd-utils/debian/patches/008_swapon.diff
===================================================================
--- trunk/freebsd-utils/debian/patches/008_swapon.diff 2006-03-18 14:37:39 UTC (rev 1349)
+++ trunk/freebsd-utils/debian/patches/008_swapon.diff 2006-03-18 14:59:08 UTC (rev 1350)
@@ -0,0 +1,92 @@
+--- src/sbin/swapon/swapon.c~ 2006-03-18 14:30:31.000000000 +0100
++++ src/sbin/swapon/swapon.c 2006-03-18 15:57:02.000000000 +0100
+@@ -167,7 +167,7 @@
+ static int
+ swap_on_off(char *name, int doingall)
+ {
+- if ((which_prog == SWAPOFF ? swapoff(name) : swapon(name)) == -1) {
++ if ((which_prog == SWAPOFF ? syscall (SYS_swapoff, name) : syscall (SYS_swapon, name)) == -1) {
+ switch (errno) {
+ case EBUSY:
+ if (!doingall)
+@@ -209,69 +209,6 @@
+ static void
+ swaplist(int lflag, int sflag, int hflag)
+ {
+- size_t mibsize, size;
+- struct xswdev xsw;
+- int hlen, mib[16], n, pagesize;
+- long blocksize;
+- long long total = 0;
+- long long used = 0;
+- long long tmp_total;
+- long long tmp_used;
+-
+- pagesize = getpagesize();
+- switch(hflag) {
+- case 'K':
+- blocksize = 1024;
+- hlen = 10;
+- break;
+- case 'M':
+- blocksize = 1024 * 1024;
+- hlen = 10;
+- break;
+- default:
+- getbsize(&hlen, &blocksize);
+- break;
+- }
+-
+- mibsize = sizeof mib / sizeof mib[0];
+- if (sysctlnametomib("vm.swap_info", mib, &mibsize) == -1)
+- err(1, "sysctlnametomib()");
+-
+- if (lflag) {
+- char buf[32];
+- snprintf(buf, sizeof(buf), "%ld-blocks", blocksize);
+- printf("%-13s %*s %*s\n",
+- "Device:",
+- hlen, buf,
+- hlen, "Used:");
+- }
+-
+- for (n = 0; ; ++n) {
+- mib[mibsize] = n;
+- size = sizeof xsw;
+- if (sysctl(mib, mibsize + 1, &xsw, &size, NULL, 0) == -1)
+- break;
+- if (xsw.xsw_version != XSWDEV_VERSION)
+- errx(1, "xswdev version mismatch");
+-
+- tmp_total = (long long)xsw.xsw_nblks * pagesize / blocksize;
+- tmp_used = (long long)xsw.xsw_used * pagesize / blocksize;
+- total += tmp_total;
+- used += tmp_used;
+- if (lflag) {
+- printf("/dev/%-8s %*lld %*lld\n",
+- devname(xsw.xsw_dev, S_IFCHR),
+- hlen, tmp_total,
+- hlen, tmp_used);
+- }
+- }
+- if (errno != ENOENT)
+- err(1, "sysctl()");
+-
+- if (sflag) {
+- printf("Total: %*lld %*lld\n",
+- hlen, total,
+- hlen, used);
+- }
++ fprintf (stderr, "%s\n", strerror (ENOSYS));
+ }
+
+--- src/sbin/swapon/swapon.c~ 2006-03-18 15:57:38.000000000 +0100
++++ src/sbin/swapon/swapon.c 2006-03-18 15:58:06.000000000 +0100
+@@ -53,6 +53,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <sys/syscall.h>
+
+ static void usage(void);
+ static int swap_on_off(char *name, int ignoreebusy);
More information about the Glibc-bsd-commits
mailing list