From 09ea7ac1a269db3c9a3b76840b37a7cb1eccbc24 Mon Sep 17 00:00:00 2001 From: landley Date: Mon, 30 Oct 2006 01:38:00 -0500 Subject: Implement df. Add -Wall to build and fix up warnings. Add copyright notices. Add error_msg() and itoa() to library. Remove argc from globals (since argv is null terminated), add optflags to globals. --- toys.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'toys.h') diff --git a/toys.h b/toys.h index e84736a0..71d70197 100644 --- a/toys.h +++ b/toys.h @@ -6,13 +6,21 @@ * Licensed under GPL version 2, see file LICENSE in this tarball for details. */ +#include +#include +#include +#include #include #include +#include #include #include #include #include #include +#include +#include +#include #include #include "lib/lib.h" @@ -44,8 +52,8 @@ void toy_exec(char *argv[]); extern struct toy_context { struct toy_list *which; // Which entry in toy_list is this one? int exitval; // Value error_exit feeds to exit() - int argc; - char **argv; + int optflags; // Command line option flags + char **argv; // Command line arguments char buf[4096]; } toys; @@ -53,7 +61,10 @@ struct exit_data {;}; struct cd_data {;}; struct toybox_data {;}; struct toysh_data {;}; -struct df_data {;}; +struct df_data { + struct string_list *fstype; + long units; +}; union toy_union { struct exit_data exit; @@ -73,3 +84,5 @@ union toy_union { #define CFG_TOYSH_ENVVARS 0 // Environment variables #define CFG_TOYSH_LOCVARS 0 // Local, synthetic, fancy prompts, set, $? #define CFG_TOYSH_PIPES 0 // Pipes and redirects: | > < >> << && || & () ; + +#define CFG_DF_PEDANTIC 1 // Support -P and -k in df -- cgit v1.2.3