9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Nickolay Saukh nms@nns.ru
Subject: Small patch for kfs to show free space on disk
Date: Thu,  9 May 1996 18:22:44 -0400	[thread overview]
Message-ID: <19960509222244.6XNS3IHBcQrZxwTsPjDAA9ezRHnWWU4MzJiDF6Fz54o@z> (raw)

Here is small patch for /sys/src/cmd/disk/kfs/con.c which allows
to get the following numbers from kfs

	number of free blocks
	file system size in blocks
	block size

Don't forget rebuild kernel (9pcdisk for PCs).

---------- cut here to destroy your CRT ----------
417a
	"free",	cmd_free, "",
.
408a
void
cmd_free(void)
{
	Iobuf *p;
	Superb *s;

	p = getbuf(cur_fs->dev, superaddr(cur_fs->dev), Bread);
	s = (Superb*) p->iobuf;
	cprint("%ld %ld %d\n", s->tfree, s->fsize, RBUFSIZE);
	putbuf(p);
}

.
---------- cut here to destroy your CRT ----------






                 reply	other threads:[~1996-05-09 22:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=19960509222244.6XNS3IHBcQrZxwTsPjDAA9ezRHnWWU4MzJiDF6Fz54o@z \
    --to=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).