From: msokolov@ivan.Harhan.ORG (Michael Sokolov)
Subject: [TUHS] question about mkfs(8) and stdio
Date: Sun, 14 Dec 03 17:22:40 PST [thread overview]
Message-ID: <0312150122.AA03565@ivan.Harhan.ORG> (raw)
Kenneth Stailey <kstailey at yahoo.com> wrote:
> Did stdio buffering change over time?
Line buffering was a Berkeley innovation. stdout became line-buffered by
default (when it is a terminal) in 4.0BSD. 4.2BSD added setlinebuf(3) to allow
people to make stdout or stderr line-buffered when they want to. 4.3BSD
extended it to work on any stream, not just stdout or stderr.
> If you look at an old BSD mkfs for cylinder-group style file systems (not 7th
> Ed filesystems)
Ahmm, you call that old? To me it's new... It's a (wonderful) 4.2BSD
innovation.
> but I have memories that the superblocks were printed out one at a time as if
> fflush(stdout) was called between them rather than one line at a time with
> line-buffered stdio.
I use 4.3BSD-* systems every day and have been for the past several years, and
you can take my word for it that on all 4.3BSD-* systems, including Quasijarus,
plain 4.3, and Ultrix the alternate superblock list output from mkfs/newfs
appears one line at a time on the tty.
> At some point I thought "SysV must have broke this"
I'm curious, where does SysV fit into this? It's the wonderful 4.2BSD
filesystem a BSD-only thing that Missed'em-five people treated as a satanic
manifestation?
> since newfs would print out
> a complete row of superblock numbers at once with a big delay between the rows
That's exactly what it does. BTW mkfs = newfs. mkfs was/is the original UNIX
filesystem creator. It was almost completely rewritten in 4.2BSD to create the
new filesystems. At the same time the newfs program was written as a user-
friendly front-end to mkfs (it merely exec'ed mkfs with a bunch of options).
The situation remained in 4.3. In 4.3-Tahoe/Quasijarus mkfs.c and newfs.c are
compiled and linked into one binary called newfs, CSRG was forced to do this in
order to support disk labels.
MS
next reply other threads:[~2003-12-15 1:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-15 1:22 Michael Sokolov [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-12-15 0:48 John Holden
2003-12-14 19:11 Kenneth Stailey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0312150122.AA03565@ivan.Harhan.ORG \
--to=msokolov@ivan.harhan.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).