Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 330720 Details for
Bug 444918
app-arch/libarchive-3.0.4-r1 -- getvfsbyname failed error occurs, doesn't work in x86 chroot on amd64-fbsd
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
files/freebsd-sources-9.1-MFC-r239588.patch
freebsd-sources-9.1-MFC-r239588.patch (text/plain), 3.00 KB, created by
Yuta SATOH
on 2012-11-27 11:38:48 UTC
(
hide
)
Description:
files/freebsd-sources-9.1-MFC-r239588.patch
Filename:
MIME Type:
Creator:
Yuta SATOH
Created:
2012-11-27 11:38:48 UTC
Size:
3.00 KB
patch
obsolete
>https://bugs.gentoo.org/444918 > >Taken from >http://svnweb.freebsd.org/base/stable/9/sys/kern/vfs_subr.c?r1=237839&r2=239755&view=patch > >FYI, >http://svnweb.freebsd.org/base?view=revision&revision=239588 > >--- stable/9/sys/kern/vfs_subr.c 2012/06/30 14:17:59 237839 >+++ stable/9/sys/kern/vfs_subr.c 2012/08/27 20:25:26 239755 >@@ -41,6 +41,7 @@ > #include <sys/cdefs.h> > __FBSDID("$FreeBSD$"); > >+#include "opt_compat.h" > #include "opt_ddb.h" > #include "opt_watchdog.h" > >@@ -3110,22 +3111,50 @@ > /* > * Fill in a struct xvfsconf based on a struct vfsconf. > */ >-static void >-vfsconf2x(struct vfsconf *vfsp, struct xvfsconf *xvfsp) >+static int >+vfsconf2x(struct sysctl_req *req, struct vfsconf *vfsp) > { >+ struct xvfsconf xvfsp; > >- strcpy(xvfsp->vfc_name, vfsp->vfc_name); >- xvfsp->vfc_typenum = vfsp->vfc_typenum; >- xvfsp->vfc_refcount = vfsp->vfc_refcount; >- xvfsp->vfc_flags = vfsp->vfc_flags; >+ bzero(&xvfsp, sizeof(xvfsp)); >+ strcpy(xvfsp.vfc_name, vfsp->vfc_name); >+ xvfsp.vfc_typenum = vfsp->vfc_typenum; >+ xvfsp.vfc_refcount = vfsp->vfc_refcount; >+ xvfsp.vfc_flags = vfsp->vfc_flags; > /* > * These are unused in userland, we keep them > * to not break binary compatibility. > */ >- xvfsp->vfc_vfsops = NULL; >- xvfsp->vfc_next = NULL; >+ xvfsp.vfc_vfsops = NULL; >+ xvfsp.vfc_next = NULL; >+ return (SYSCTL_OUT(req, &xvfsp, sizeof(xvfsp))); > } > >+#ifdef COMPAT_FREEBSD32 >+struct xvfsconf32 { >+ uint32_t vfc_vfsops; >+ char vfc_name[MFSNAMELEN]; >+ int32_t vfc_typenum; >+ int32_t vfc_refcount; >+ int32_t vfc_flags; >+ uint32_t vfc_next; >+}; >+ >+static int >+vfsconf2x32(struct sysctl_req *req, struct vfsconf *vfsp) >+{ >+ struct xvfsconf32 xvfsp; >+ >+ strcpy(xvfsp.vfc_name, vfsp->vfc_name); >+ xvfsp.vfc_typenum = vfsp->vfc_typenum; >+ xvfsp.vfc_refcount = vfsp->vfc_refcount; >+ xvfsp.vfc_flags = vfsp->vfc_flags; >+ xvfsp.vfc_vfsops = 0; >+ xvfsp.vfc_next = 0; >+ return (SYSCTL_OUT(req, &xvfsp, sizeof(xvfsp))); >+} >+#endif >+ > /* > * Top level filesystem related information gathering. > */ >@@ -3133,14 +3162,16 @@ > sysctl_vfs_conflist(SYSCTL_HANDLER_ARGS) > { > struct vfsconf *vfsp; >- struct xvfsconf xvfsp; > int error; > > error = 0; > TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { >- bzero(&xvfsp, sizeof(xvfsp)); >- vfsconf2x(vfsp, &xvfsp); >- error = SYSCTL_OUT(req, &xvfsp, sizeof xvfsp); >+#ifdef COMPAT_FREEBSD32 >+ if (req->flags & SCTL_MASK32) >+ error = vfsconf2x32(req, vfsp); >+ else >+#endif >+ error = vfsconf2x(req, vfsp); > if (error) > break; > } >@@ -3160,7 +3191,6 @@ > int *name = (int *)arg1 - 1; /* XXX */ > u_int namelen = arg2 + 1; /* XXX */ > struct vfsconf *vfsp; >- struct xvfsconf xvfsp; > > printf("WARNING: userland calling deprecated sysctl, " > "please rebuild world\n"); >@@ -3184,9 +3214,12 @@ > break; > if (vfsp == NULL) > return (EOPNOTSUPP); >- bzero(&xvfsp, sizeof(xvfsp)); >- vfsconf2x(vfsp, &xvfsp); >- return (SYSCTL_OUT(req, &xvfsp, sizeof(xvfsp))); >+#ifdef COMPAT_FREEBSD32 >+ if (req->flags & SCTL_MASK32) >+ return (vfsconf2x32(req, vfsp)); >+ else >+#endif >+ return (vfsconf2x(req, vfsp)); > } > return (EOPNOTSUPP); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 444918
:
330718
| 330720