view toys/df.c @ 2:67b517913e56

Infrastructure, first drop of toy shell, and a bit of work on df.
author landley@driftwood
date Thu, 05 Oct 2006 16:18:03 -0400
parents 59d58fab67c6
children fc9c0503d5e2
line wrap: on
line source

/* vi: set sw=4 ts=4: */
/*
 * df.c - report free disk space.
 *
 * Implemented according to SUSv3:
 * http://www.opengroup.org/onlinepubs/009695399/utilities/df.html
 * 
 * usage: df [-k] [-P|-t] [file...]
 */

#include "toys.h"

int df_main(void)
{
	struct mtab_list *mt, *mtlist;

	//int units = 512;
	mtlist = getmountlist(1);
	// Zap overmounts
	for (mt = mtlist; mt; mt = mt->next) {
		printf("type=%s dir=%s device=%s\n",mt->type,mt->dir,mt->device);
	}

	return 0;
}