Subject: bin/989: newfs flushes wrong descriptor
To: None <gnats-admin@NetBSD.ORG>
From: None <sh391@city.ac.uk>
List: netbsd-bugs
Date: 04/24/1995 11:50:05
>Number:         989
>Category:       bin
>Synopsis:       newfs flushes wrong descriptor
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 24 11:50:03 1995
>Originator:     David Brownlee
>Organization:
Private
>Release:        -current april '95
>Environment:
sparc, 1.0A, current
System: NetBSD gluon.city.ac.uk 1.0A NetBSD 1.0A (GLUON) #1: Thu Feb 9 11:25:40 GMT 1995 monoadm@gluon.city.ac.uk:/mono/u1/NetBSD/src/sys/arch/sparc/compile/GLUON sparc


>Description:
	newfs flushes stderr after printing each blocknumber. Unfortunately
	they are being printed via stdout :)

>How-To-Repeat:
	Run newfs & notice the block numbers only appear as the \n is printed.
>Fix:

*** mkfs.c.orig	Sun Apr 23 18:18:23 1995
--- mkfs.c	Sun Apr 23 18:18:32 1995
***************
*** 599,605 ****
  		if (cylno % 8 == 0)
  			printf("\n");
  		printf(" %d,", fsbtodb(&sblock, cgsblock(&sblock, cylno)));
! 		fflush(stderr);
  	}
  	if (!mfs)
  		printf("\n");
--- 599,605 ----
  		if (cylno % 8 == 0)
  			printf("\n");
  		printf(" %d,", fsbtodb(&sblock, cgsblock(&sblock, cylno)));
! 		fflush(stdout);
  	}
  	if (!mfs)
  		printf("\n");
>Audit-Trail:
>Unformatted: