From cse.psu.edu!9fans-outgoing-owner Thu May 9 18:32:08 1996 Received: from colossus.cse.psu.edu ([130.203.1.2]) by cannon.ecf.toronto.edu with SMTP id <10133>; Thu, 9 May 1996 18:32:04 -0400 Received: by colossus.cse.psu.edu id <78951>; Thu, 9 May 1996 18:23:40 -0400 Received: from Draculina.nns.ru ([194.135.102.2]) by colossus.cse.psu.edu with SMTP id <78950>; Thu, 9 May 1996 18:23:23 -0400 Received: from Alyona.office.nns.ru (Alyona.office.nns.ru [192.168.1.3]) by Draculina.nns.ru (8.7.3/8.7.3) with ESMTP id CAA29086 for <9fans@cse.psu.edu>; Fri, 10 May 1996 02:22:45 +0400 (MSD) Received: from Alyona.office.nns.ru (localhost [127.0.0.1]) by Alyona.office.nns.ru (8.7.3/8.7.3) with ESMTP id CAA16044 for <9fans@cse.psu.edu>; Fri, 10 May 1996 02:22:44 +0400 (MSD) To: 9fans@cse.psu.edu (Plan 9 from Bell Labs fans) Subject: Small patch for kfs to show free space on disk MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16041.831680564.1@Alyona.office.nns.ru> Date: Thu, 9 May 1996 18:22:44 -0400 Message-ID: <16042.831680564@Alyona.office.nns.ru> From: Nickolay Saukh Sender: owner-9fans@cse.psu.edu Precedence: bulk Reply-To: 9fans@cse.psu.edu Status: RO 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 ----------