kern/152079: msdosfs: Small cleanups from the other NetBSD/OpenBSD
>Number: 152079 >Category: kern >Synopsis: msdosfs: Small cleanups from the other NetBSD/OpenBSD >Confidential: no >Severity: non-critical >Priority: low >Responsible:freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 09 15:50:06 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Pedro Giffuni >Release:8.1-RELEASE >Organization: >Environment: FreeBSD mogwai.giffuni.net 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 r...@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: Here are some small cleanups to sync with the other BSDs. denode.h NetBSD: protect userland exported files against multiple inclusion. OpenBSD: Move some macros in to outside the #ifdef _KERNEL so that libkvm doesn't need to define that, thereby avoiding some warnings. msdosfs_lookup.c NetBSD: Return EINVAL for rename and delete operations to the root directory instead of the erroneous EROFS. >How-To-Repeat: >Fix: Patch follows. Patch attached with submission follows: --- msdosfs/denode.h.orig 2010-11-09 09:54:16.0 + +++ msdosfs/denode.h2010-11-09 10:11:06.0 + @@ -47,6 +47,8 @@ * * October 1992 */ +#ifndef _FS_MSDOSFS_DENODE_H_ +#define _FS_MSDOSFS_DENODE_H_ /* * This is the pc filesystem specific portion of the vnode structure. @@ -207,8 +209,6 @@ ((dep)->de_Attributes & ATTR_DIRECTORY) ? 0 : (dep)->de_FileSize), \ putushort((dp)->deHighClust, (dep)->de_StartCluster >> 16)) -#ifdef _KERNEL - #defineVTODE(vp) ((struct denode *)(vp)->v_data) #defineDETOV(de) ((de)->de_vnode) @@ -254,6 +254,8 @@ #endif }; +#ifdef _KERNEL + extern struct vop_vector msdosfs_vnodeops; int msdosfs_lookup(struct vop_cachedlookup_args *); @@ -279,3 +281,4 @@ int detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred, struct thread *td); int doscheckpath( struct denode *source, struct denode *target); #endif /* _KERNEL */ +#endif /* !_FS_MSDOSFS_DENODE_H_ */ --- msdosfs/msdosfs_lookup.c.orig 2010-11-09 09:49:14.0 + +++ msdosfs/msdosfs_lookup.c2010-11-09 09:50:44.0 + @@ -458,7 +458,7 @@ * Don't allow deleting the root. */ if (blkoff == MSDOSFSROOT_OFS) - return EROFS; /* really? XXX */ + return EINVAL; /* * Write access to directory required to delete files. @@ -491,7 +491,7 @@ */ if (nameiop == RENAME && (flags & ISLASTCN)) { if (blkoff == MSDOSFSROOT_OFS) - return EROFS; /* really? XXX */ + return EINVAL; error = VOP_ACCESS(vdp, VWRITE, cnp->cn_cred, cnp->cn_thread); if (error) >Release-Note: >Audit-Trail: >Unformatted: ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"
misc/152080: flashplugin-mozilla port is broken
>Number: 152080 >Category: misc >Synopsis: flashplugin-mozilla port is broken >Confidential: no >Severity: non-critical >Priority: low >Responsible:freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 09 15:50:06 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Rafal >Release:FreeBSD 8.1 >Organization: >Environment: FreeBSD kenorb 8.1-STABLE FreeBSD 8.1-STABLE #3: Wed Nov 3 14:36:47 GMT 2010 r...@kenorb:/usr/obj/usr/src/sys/BRO amd64 >Description: I installed flashplugin-mozilla from ports. It doesn't work with Firefox and See bug reports: https://bugzilla.mozilla.org/show_bug.cgi?id=610610 https://sourceforge.net/tracker/?func=detail&aid=3105876&group_id=110956&atid=657852 https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/607211 http://forums.freebsd.org/showthread.php?t=15446 http://forums.freebsd.org/showthread.php?p=108468 http://forums.freebsd.org/showthread.php?t=18985 Basically this port is 5 years old and it's too old and it's not supported anymore. The name is confusing, because it looks like it's the most appropriate package for flash plugin. " Date: 2010-11-09 12:04:48 GMT Sender: tgc GPLFlash isn't maintained anymore. Instead try gnash or lightspark " >How-To-Repeat: > gdb epiphany SetWindow The program 'epiphany' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 27 error_code 3 request_code 3 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) [Thread 80e4a4140 (LWP 100683) exited] Program exited with code 01. With Firefox: Backtrace: (gdb) bt #0 RealBreak () at nsDebugImpl.cpp:421 #1 0x000801c399da in NS_DebugBreak_P (aSeverity=3, aStr=0x8155495c8 "X_ShmCreatePixmap: BadImplementation (server does not implement operation); 2 requests ago; id=0x423", aExpr=0x0, aFile=0x801cce3b0 "nsX11ErrorHandler.cpp", aLine=182) at nsDebugImpl.cpp:324 #2 0x000800ae90a3 in X11Error (display=0x813151000, event=0x7fffd7b0) at nsX11ErrorHandler.cpp:182 #3 0x000804c841c5 in _XError () from /usr/local/lib/libX11.so.6 #4 0x000804c8a944 in process_responses () from /usr/local/lib/libX11.so.6 #5 0x000804c8aed7 in _XReply () from /usr/local/lib/libX11.so.6 #6 0x000804c8009a in XSync () from /usr/local/lib/libX11.so.6 #7 0x00081920383d in FlashGraphicInitX11 (This=0x812a5c240) at plugin.c:789 #8 0x000819202e28 in NPP_Write (instance=0x811bcd530, stream=0x8155499c8, offset=0, len=7607, buffer=0x814a77000) at plugin.c:405 #9 0x000819203e0c in Private_Write (instance=0x811bcd530, stream=0x8155499c8, offset=0, len=7607, buffer=0x814a77000) at npunix.c:223 >Fix: Workaround: sudo pkg_delete -v flashplugin-mozilla\* sudo portinstall nspluginwrapper linux_base-f10 sudo ln -s /usr/local/lib/npapi/linux-f10-flashplugin/libflashplayer.so /usr/local/lib/browser_plugins/ sudo nspluginwrapper -v -a -i sudo mount -t linprocfs linproc /usr/compat/linux/proc echo 'linproc/usr/compat/linux/proc linprocfs rw 0 0' >> /etc/fstab # run from root, to add at boot time Solution for /usr/ports/www/flashplugin-mozilla: Can you mark this port as ignore or broken? Or just add the message in pkg-message: This port is old and no more supported. Please use alternatives such as: gnash, lightspark or linux-f10-flashplugin Or addthe link to the handbook: http://www.freebsd.org/doc/handbook/desktop-browsers.html >Release-Note: >Audit-Trail: >Unformatted: ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"
misc/152084: pw(8) does not allow @ or ! in gecos
>Number: 152084 >Category: misc >Synopsis: pw(8) does not allow @ or ! in gecos >Confidential: no >Severity: non-critical >Priority: low >Responsible:freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Nov 09 18:30:11 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Jan Schaumann >Release: >Organization: >Environment: >Description: pw(8) does not allow you to add a user with a ! or a @ in the gecos field. I have not been able to find any standard mentioning these as invalid characters, nor do various other unix flavors implement this restriction. >How-To-Repeat: pw user add -n name -u uid -g gid -d dir -s shell -c"Something with an @ in it" >Fix: --- pw_user.c.orig Tue Nov 9 10:22:10 2010 +++ pw_user.c Tue Nov 9 10:24:01 2010 @@ -1172,7 +1172,7 @@ reject = 0; if (gecos) { /* See if the name is valid as a gecos (comment) field. */ - badchars = ":!@"; + badchars = ":"; showtype = "gecos field"; } else { /* See if the name is valid as a userid or group. */ >Release-Note: >Audit-Trail: >Unformatted: ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"
Re: bin/144306: [libm] [patch] Nasty bug in jn(3)
The following reply was made to PR bin/144306; it has been noted by GNATS. From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: bug-follo...@freebsd.org, ka...@troutmask.apl.washington.edu Cc: Subject: Re: bin/144306: [libm] [patch] Nasty bug in jn(3) Date: Tue, 9 Nov 2010 21:02:44 +0100 --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello Steve, I saw your updated patch for jnf(3) on the mailing list and was wondering what the correct values for your test case would look like? I'm asking because on Ubuntu I get slightly different values. Especially disturbing is, that for FreeBSD the jn/jnf values are identical in this case. Ubuntu 10.04: # cc -o testjn -lm testjn.c && ./testjn 2 4.317548e-01 3 1.850071e-01 4 6.121505e-02 5 1.568141e-02 6 3.251921e-03 7 5.737757e-04 8 8.808225e-05 9 1.195869e-05 # cc -o testjnf -lm testjnf.c && ./testjnf 2 4.317548e-01 3 2.126431e-01 4 6.348598e-02 5 1.606404e-02 6 3.341151e-03 7 5.894695e-04 8 9.07e-05 9 1.228349e-05 FreeBSD -CURRENT: freebsd64# cc -o testjn -lm testjn.c && ./testjn 2 4.317548e-01 3 1.98e-01 4 6.474667e-02 5 1.638924e-02 6 3.404818e-03 7 6.006884e-04 8 9.216579e-05 9 1.251727e-05 freebsd64# cc -o testjnf -lm testjnf.c && ./testjnf 2 4.317548e-01 3 1.98e-01 4 6.474666e-02 5 1.638924e-02 6 3.404818e-03 7 6.006881e-04 8 9.216577e-05 9 1.251727e-05 (both systems are amd64, I tried gcc and clang on FreeBSD, giving the same results.) Here's the full patch, for archival purposes: --IS0zKkzwUGydFO0o Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="msun.diff" Content-Transfer-Encoding: 8bit commit 1db46def1f105e5b8a2d814eeaac46716b1a663c Author: Ulrich Spörlein Date: Tue Nov 9 20:39:57 2010 +0100 Fix bug with jn(3) and jnf(3) PR:bin/144306 Submitted by: Steven G. Kargl diff --git a/lib/msun/src/e_jn.c b/lib/msun/src/e_jn.c index e277e30..8b0bc62 100644 --- a/lib/msun/src/e_jn.c +++ b/lib/msun/src/e_jn.c @@ -200,7 +200,12 @@ __ieee754_jn(int n, double x) } } } - b = (t*__ieee754_j0(x)/b); + z = __ieee754_j0(x); + w = __ieee754_j1(x); + if (fabs(z) >= fabs(w)) + b = (t*z/b); + else + b = (t*w/a); } } if(sgn==1) return -b; else return b; diff --git a/lib/msun/src/e_jnf.c b/lib/msun/src/e_jnf.c index 3bbf7b7..d045bb05 100644 --- a/lib/msun/src/e_jnf.c +++ b/lib/msun/src/e_jnf.c @@ -152,7 +152,12 @@ __ieee754_jnf(int n, float x) } } } - b = (t*__ieee754_j0f(x)/b); + z = __ieee754_j0f(x); + w = __ieee754_j1f(x); + if (fabs(z) >= fabs(w)) + b = (t*z/b); + else + b = (t*w/a); } } if(sgn==1) return -b; else return b; --IS0zKkzwUGydFO0o-- ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"
Re: bin/151592: commit references a PR
The following reply was made to PR bin/151592; it has been noted by GNATS. From: dfil...@freebsd.org (dfilter service) To: bug-follo...@freebsd.org Cc: Subject: Re: bin/151592: commit references a PR Date: Tue, 9 Nov 2010 20:45:01 + (UTC) Author: dumbbell Date: Tue Nov 9 20:44:55 2010 New Revision: 215053 URL: http://svn.freebsd.org/changeset/base/215053 Log: MFC r214893: Fix a segmentation fault in argument processing. The crash was caused by a command line such as this one: # fold -b1 PR: bin/151592 Reporter by: Marcus Reid Tested by: Marcus Reid Modified: stable/8/usr.bin/fold/fold.c Directory Properties: stable/8/usr.bin/fold/ (props changed) Modified: stable/8/usr.bin/fold/fold.c == --- stable/8/usr.bin/fold/fold.c Tue Nov 9 20:41:10 2010 (r215052) +++ stable/8/usr.bin/fold/fold.c Tue Nov 9 20:44:55 2010 (r215053) @@ -71,14 +71,14 @@ int sflag; /* Split on word boundaries int main(int argc, char **argv) { - int ch; + int ch, previous_ch; int rval, width; - char *p; (void) setlocale(LC_CTYPE, ""); width = -1; - while ((ch = getopt(argc, argv, "0123456789bsw:")) != -1) + previous_ch = 0; + while ((ch = getopt(argc, argv, "0123456789bsw:")) != -1) { switch (ch) { case 'b': bflag = 1; @@ -93,17 +93,33 @@ main(int argc, char **argv) break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': - if (width == -1) { - p = argv[optind - 1]; - if (p[0] == '-' && p[1] == ch && !p[2]) - width = atoi(++p); - else - width = atoi(argv[optind] + 1); + /* Accept a width as eg. -30. Note that a width + * specified using the -w option is always used prior + * to this undocumented option. */ + switch (previous_ch) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + /* The width is a number with multiple digits: + * add the last one. */ + width = width * 10 + (ch - '0'); + break; + default: + /* Set the width, unless it was previously + * set. For instance, the following options + * would all give a width of 5 and not 10: + * -10 -w5 + * -5b10 + * -5 -10b */ + if (width == -1) + width = ch - '0'; + break; } break; default: usage(); } + previous_ch = ch; + } argv += optind; argc -= optind; ___ svn-src-...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org" ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"
Re: bin/151592: commit references a PR
The following reply was made to PR bin/151592; it has been noted by GNATS. From: dfil...@freebsd.org (dfilter service) To: bug-follo...@freebsd.org Cc: Subject: Re: bin/151592: commit references a PR Date: Tue, 9 Nov 2010 20:57:01 + (UTC) Author: dumbbell Date: Tue Nov 9 20:56:55 2010 New Revision: 215055 URL: http://svn.freebsd.org/changeset/base/215055 Log: MFC r214893: Fix a segmentation fault in argument processing. The crash was caused by a command line such as this one: # fold -b1 PR: bin/151592 Reported by: Marcus Reid Tested by: Marcus Reid Modified: stable/7/usr.bin/fold/fold.c Directory Properties: stable/7/usr.bin/fold/ (props changed) Modified: stable/7/usr.bin/fold/fold.c == --- stable/7/usr.bin/fold/fold.c Tue Nov 9 20:46:41 2010 (r215054) +++ stable/7/usr.bin/fold/fold.c Tue Nov 9 20:56:55 2010 (r215055) @@ -71,14 +71,14 @@ int sflag; /* Split on word boundaries int main(int argc, char **argv) { - int ch; + int ch, previous_ch; int rval, width; - char *p; (void) setlocale(LC_CTYPE, ""); width = -1; - while ((ch = getopt(argc, argv, "0123456789bsw:")) != -1) + previous_ch = 0; + while ((ch = getopt(argc, argv, "0123456789bsw:")) != -1) { switch (ch) { case 'b': bflag = 1; @@ -93,17 +93,33 @@ main(int argc, char **argv) break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': - if (width == -1) { - p = argv[optind - 1]; - if (p[0] == '-' && p[1] == ch && !p[2]) - width = atoi(++p); - else - width = atoi(argv[optind] + 1); + /* Accept a width as eg. -30. Note that a width + * specified using the -w option is always used prior + * to this undocumented option. */ + switch (previous_ch) { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + /* The width is a number with multiple digits: + * add the last one. */ + width = width * 10 + (ch - '0'); + break; + default: + /* Set the width, unless it was previously + * set. For instance, the following options + * would all give a width of 5 and not 10: + * -10 -w5 + * -5b10 + * -5 -10b */ + if (width == -1) + width = ch - '0'; + break; } break; default: usage(); } + previous_ch = ch; + } argv += optind; argc -= optind; ___ svn-src-...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org" ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"
Re: bin/151592: fold(1) segfaults on argument processing
Synopsis: fold(1) segfaults on argument processing State-Changed-From-To: open->closed State-Changed-By: dumbbell State-Changed-When: Tue Nov 9 21:01:10 UTC 2010 State-Changed-Why: Fix committed to HEAD and MFC'd to stable/8 and stable/7. http://www.freebsd.org/cgi/query-pr.cgi?pr=151592 ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"
bin/152087: 8-STABLE gmultipath error 'Unknown verb add'
>Number: 152087 >Category: bin >Synopsis: 8-STABLE gmultipath error 'Unknown verb add' >Confidential: no >Severity: non-critical >Priority: low >Responsible:freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Nov 10 00:40:07 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Mike Carlson >Release:8-STABLE >Organization: LLNL >Environment: FreeBSD write.llnl.gov 8.1-STABLE FreeBSD 8.1-STABLE #0: Mon Nov 8 16:38:06 PST 2010 r...@write.llnl.gov:/usr/obj/usr/src/sys/GENERIC amd64 >Description: I just built 8-STABLE today. Previously, gmultipath seemed to work by specifying the device handles per label. However, now gmultipath doesn't seem to add any other components besides the first one (da2 in this case): write# camcontrol inquiry da2 -S 085E8C6B38CC76 write# camcontrol inquiry da9 -S 085E8C6B38CC76 write# gmultipath label -v WINSYS-V001 /dev/da2 /dev/da9 gmultipath: Unknown verb add write# gmultipath status Name Status Components multipath/WINSYS-V001 N/A da2 write# dmesg | tail -2 GEOM_MULTIPATH: adding da2 to WINSYS-V001/cbaa6887-ec4f-11df-bb7a-1cc1dee9fbae GEOM_MULTIPATH: da2 now active path in WINSYS-V001 I have trick GEOM into recognizing the other disk: write# echo 1 > /dev/da9 write# dmesg| tail -1 GEOM_MULTIPATH: adding da9 to WINSYS-V001/bd0f1f20-ec50-11df-bb7a-1cc1dee9fbae write# gmultipath status Name Status Components multipath/WINSYS-V001 N/A da2 da9 Otherwise, the interaction with the device label works fine. I know the SVN commit 207384 changed the behavior of gmultipath, so I'm assuming it is related. >How-To-Repeat: see 'gmultipath woes' http://docs.freebsd.org/cgi/getmsg.cgi?fetch=40337+0+archive/2010/freebsd-geom/20100801.freebsd-geom : [r...@ostracod /mnt]# mdconfig -a -t vnode -f /scratch/test.dsk -u 12 [r...@ostracod /mnt]# mdconfig -a -t vnode -f /scratch/test.dsk -u 13 [r...@ostracod /mnt]# sysctl kern.geom.multipath.debug=1 kern.geom.multipath.debug: 1 -> 1 [r...@ostracod /mnt]# gmultipath label -v TEST /dev/md12 /dev/md13 gmultipath: Unknown verb add [r...@ostracod /mnt]# gmultipath list Geom name: TEST Providers: 1. Name: multipath/TEST Mediasize: 52428288 (50M) Sectorsize: 512 Mode: r0w0e0 Consumers: 1. Name: md12 Mediasize: 52428800 (50M) Sectorsize: 512 Mode: r0w0e0 [r...@ostracod /mnt]# gmultipath status Name Status Components multipath/TEST N/A md12 However doing echo 1 > /dev/md13 made geom re-taste the device so I get [r...@ostracod /mnt]# gmultipath list Geom name: TEST Providers: 1. Name: multipath/TEST Mediasize: 52428288 (50M) Sectorsize: 512 Mode: r0w0e0 Consumers: 1. Name: md12 Mediasize: 52428800 (50M) Sectorsize: 512 Mode: r0w0e0 2. Name: md13 Mediasize: 52428800 (50M) Sectorsize: 512 Mode: r0w0e0 >Fix: >Release-Note: >Audit-Trail: >Unformatted: ___ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"