Damien Miller | 1 Feb 2005 06:59
Favicon

Re: poor scsi perf but excellent IDE

J.D. Bronson wrote:

> When I run dump between IDE drives (each on own controller) I see well 
> over 18MB/sec in transfers...and the time indicated matches.
> 
> When I run dump between SCSI drives (each on own controller) I see only
> 5.9MB/sec in transfers...and the time indicated matches.

IDE drives enabling write-caching by default?

-d

Han Boetes | 1 Feb 2005 15:59
Picon

fix mg after latest patch and add support for waiting to read errormessage

Hi,

After the latest update to mg a little thing was forgotten:

cd /tmp # because the dir isn't owned by me
touch test test~
sudo chown root test~
mg test
# now add some stuff and exit

And now mg SHOULD complain it can't make the backup but it doesn't
since it doesn't get the proper return code.

This patch fixes the problem. Looks a bit odd since the variable
``nread'' now all of the sudden doesn't have the right name
anymore. But it does fix the problem.

Index: fileio.c
===================================================================
RCS file: /cvs/src/usr.bin/mg/fileio.c,v
retrieving revision 1.44
diff -u -w -p -r1.44 fileio.c
--- fileio.c	31 Jan 2005 15:48:00 -0000	1.44
+++ fileio.c	1 Feb 2005 14:27:29 -0000
 <at>  <at>  -209,6 +209,7  <at>  <at>  fbackupfile(const char *fn)
 		if (rename(tname, nname) == -1) {
 			ewprintf("Can't rename temp : %s", strerror(errno));
 			(void) unlink(tname);
+                        nread = -1;
 		}
(Continue reading)

Han Boetes | 1 Feb 2005 16:07
Picon

Re: reading from a usb2 hd gets interupted

I resolved the irq conflict by moving around the pci-usb2 card.
Still the same problem.

OpenBSD 3.6-current (GENERIC) #3: Fri Jan 28 21:54:42 MST 2005
    pvalchev <at> i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium II ("GenuineIntel" 686-class, 512KB L2 cache) 412 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR
real mem  = 200908800 (196200K)
avail mem = 176750592 (172608K)
using 2478 buffers containing 10149888 bytes (9912K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(a3) BIOS, date 06/28/00, BIOS32 rev. 0  <at>  0xfb380
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
pcibios0 at bios0: rev 2.1  <at>  0xf0000/0xb808
pcibios0: PCI IRQ Routing Table rev 1.0  <at>  0xfdf00/144 (7 entries)
pcibios0: PCI Exclusive IRQs: 9 10 11 12
pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371SB ISA" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0x8800
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x03
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "Nvidia Riva TNT" rev 0x04
wsdisplay0 at vga1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02
pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility,
(Continue reading)

Han Boetes | 1 Feb 2005 18:01
Picon

prettify the code a bit

Hi,

While reading the code for grep, looking for the explanation of
unexpected behaviour I found the following improvement of
readability (I think).

Index: file.c
===================================================================
RCS file: /cvs/src/usr.bin/grep/file.c,v
retrieving revision 1.5
diff -u -w -p -r1.5 file.c
--- file.c	29 Dec 2003 21:20:55 -0000	1.5
+++ file.c	1 Feb 2005 16:36:47 -0000
 <at>  <at>  -93,7 +93,7  <at>  <at>  grep_fdopen(int fd, char *mode)
 {
 	file_t *f;

-	if (fd == 0)
+	if (fd == FILE_STDIO)
 		snprintf(fname, sizeof fname, "(standard input)");
 	else
 		snprintf(fname, sizeof fname, "(fd %d)", fd);

# Han

Jared Yanovich | 1 Feb 2005 18:23
Picon

Re: prettify the code a bit

On Tue, 1 Feb 2005 18:01:10 +0100
Han Boetes <han <at> mijncomputer.nl> wrote:

> While reading the code for grep, looking for the explanation of
> unexpected behaviour I found the following improvement of
> readability (I think).
> 
> Index: file.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/grep/file.c,v
> retrieving revision 1.5
> diff -u -w -p -r1.5 file.c
> --- file.c	29 Dec 2003 21:20:55 -0000	1.5
> +++ file.c	1 Feb 2005 16:36:47 -0000
>  <at>  <at>  -93,7 +93,7  <at>  <at>  grep_fdopen(int fd, char *mode)
>  {
>  	file_t *f;
>  
> -	if (fd == 0)
> +	if (fd == FILE_STDIO)
>  		snprintf(fname, sizeof fname, "(standard input)");
>  	else
>  		snprintf(fname, sizeof fname, "(fd %d)", fd);

I think you mean STDIN_FILENO.  FILE_STDIO is used for something
else.

Axel Andersson | 1 Feb 2005 20:32

pthread_mutex_unlock.3 typo

Index: pthread_mutex_unlock.3
===================================================================
RCS file: /cvs/src/lib/libpthread/man/pthread_mutex_unlock.3,v
retrieving revision 1.6
diff -u -r1.6 pthread_mutex_unlock.3
--- pthread_mutex_unlock.3      21 Feb 2002 20:12:19 -0000      1.6
+++ pthread_mutex_unlock.3      1 Feb 2005 19:25:52 -0000
 <at>  <at>  -52,7 +52,7  <at>  <at> 
  will return zero, otherwise an error number will be returned to
  indicate the error.
  .Sh ERRORS
-.Fn pthread_mutex_trylock
+.Fn pthread_mutex_unlock
  will fail if:
  .Bl -tag -width Er
  .It Bq Er EINVAL

--

-- 
Axel Andersson
axel <at> zankasoftware.com
http://www.zankasoftware.com/

Jason McIntyre | 1 Feb 2005 20:44

Re: pthread_mutex_unlock.3 typo

On Tue, Feb 01, 2005 at 08:32:40PM +0100, Axel Andersson wrote:
> Index: pthread_mutex_unlock.3
> ===================================================================
> RCS file: /cvs/src/lib/libpthread/man/pthread_mutex_unlock.3,v
> retrieving revision 1.6
> diff -u -r1.6 pthread_mutex_unlock.3
> --- pthread_mutex_unlock.3      21 Feb 2002 20:12:19 -0000      1.6
> +++ pthread_mutex_unlock.3      1 Feb 2005 19:25:52 -0000
>  <at>  <at>  -52,7 +52,7  <at>  <at> 
>  will return zero, otherwise an error number will be returned to
>  indicate the error.
>  .Sh ERRORS
> -.Fn pthread_mutex_trylock
> +.Fn pthread_mutex_unlock
>  will fail if:
>  .Bl -tag -width Er
>  .It Bq Er EINVAL
> 

fixed, thanks.
jmc

Damien Miller | 2 Feb 2005 04:26
Favicon

Re: prettify the code a bit

Han Boetes wrote:
> Hi,
> 
> While reading the code for grep, looking for the explanation of
> unexpected behaviour I found the following improvement of
> readability (I think).
> 
> 
> Index: file.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/grep/file.c,v
> retrieving revision 1.5
> diff -u -w -p -r1.5 file.c
> --- file.c	29 Dec 2003 21:20:55 -0000	1.5
> +++ file.c	1 Feb 2005 16:36:47 -0000
>  <at>  <at>  -93,7 +93,7  <at>  <at>  grep_fdopen(int fd, char *mode)
>  {
>  	file_t *f;
>  
> -	if (fd == 0)
> +	if (fd == FILE_STDIO)

Don't you mean STDIN_FILENO ?

Brad | 2 Feb 2005 04:30

bmtphy diff

If you have a bce(4) NIC, a 3Com 3c905C or a Mac with gem(4) + bmtphy
then please take this diff for a spin. Also if you have any other
NICs that might happen to have any of Broadcom's 10/100 PHY.

Index: dev/mii/bmtphy.c
===================================================================
RCS file: /cvs/src/sys/dev/mii/bmtphy.c,v
retrieving revision 1.11
diff -u -p -r1.11 bmtphy.c
--- dev/mii/bmtphy.c	28 Jan 2005 18:27:55 -0000	1.11
+++ dev/mii/bmtphy.c	30 Jan 2005 01:45:34 -0000
 <at>  <at>  -1,5 +1,5  <at>  <at> 
 /*	$OpenBSD: bmtphy.c,v 1.11 2005/01/28 18:27:55 brad Exp $	*/
-/*	$NetBSD: nsphy.c,v 1.25 2000/02/02 23:34:57 thorpej Exp $	*/
+/*	$NetBSD: bmtphy.c,v 1.17 2005/01/17 13:17:45 scw Exp $	*/

 /*-
  * Copyright (c) 2001 Theo de Raadt
 <at>  <at>  -27,8 +27,9  <at>  <at> 
  */

 /*
- * driver for Broadcom BCM5201/5202 Mini-Theta ethernet 10/100 PHY
- * Data Sheet available from Broadcom
+ * Driver for Broadcom BCM5201/BCM5202 "Mini-Theta" PHYs.  This also
+ * drives the PHY on the 3Com 3c905C.  The 3c905C's PHY is described in
+ * the 3c905C data sheet.
  */

 #include <sys/param.h>
(Continue reading)

Han Boetes | 2 Feb 2005 06:41
Picon

Re: prettify the code a bit

Jared Yanovich wrote:
> Han Boetes <han <at> mijncomputer.nl> wrote:
> > -	if (fd == 0)
> > +	if (fd == FILE_STDIO)
>
> I think you mean STDIN_FILENO. FILE_STDIO is used for something
> else.

I was following the logic of the rest of the file and 0 is used as
FILE_STDIO:

#define FILE_STDIO      0
#define FILE_MMAP       1
#define FILE_GZIP       2

That's why I choose it. But indeed, your suggestion makes more
sense.

# Han


Gmane