9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Andrés <adelfino@gmail.com>
To: 9fans@9fans.net
Subject: [9fans] Why isn't there a newline character after the first line of /dev/wsys/wctl?
Date: Thu, 14 Jan 2010 23:21:24 -0200	[thread overview]
Message-ID: <4d90013f1001141721y6d8098cejf16f2abf3476d01c@mail.gmail.com> (raw)

rio(4) says:

wctl may be read. When read, it returns the location of the window as
four decimal integers formatted in the usual 12–character style: upper
left x and y, lower right x and y. Following these numbers are strings
describing the window's state: hidden  or visible; current or
notcurrent. A subsequent read will block until the window changes
size, location, or state.

I'm new to Plan 9, but isn't:

term% read /mnt/wsys/wctl

Supposed to just print the first line?, instead, it prints:

read: error reading /mnt/wsys/wctl: buffer too small

Several guys from #plan9 in Freenode told me that that was happening
because of a missing newline.

olegfink told me how to work around this, with:
dd -count 1 -quiet 1 -if /mnt/wsys/wctl

But, is the current behavior correct? Or is it erroneous?

Greetings.



             reply	other threads:[~2010-01-15  1:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-15  1:21 Andrés [this message]
2010-01-15  2:54 ` erik quanstrom

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=4d90013f1001141721y6d8098cejf16f2abf3476d01c@mail.gmail.com \
    --to=adelfino@gmail.com \
    --cc=9fans@9fans.net \
    /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).