9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Small patch for kfs to show free space on disk
@ 1996-05-09 22:22 Nickolay
  0 siblings, 0 replies; only message in thread
From: Nickolay @ 1996-05-09 22:22 UTC (permalink / 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 ----------






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-05-09 22:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-05-09 22:22 Small patch for kfs to show free space on disk Nickolay

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).