FreeCalypso > hg > freecalypso-sw
diff rvinterf/etmsync/stddirs.c @ 914:de0505be800d
fc-fsio: create-std-dirs implemented
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Tue, 08 Sep 2015 18:08:03 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rvinterf/etmsync/stddirs.c Tue Sep 08 18:08:03 2015 +0000 @@ -0,0 +1,39 @@ +/* + * An automated way to create the standard set of FFS directories + */ + +#include <sys/types.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <strings.h> +#include "exitcodes.h" + +static char *std_dir_list[] = { + "/gsm", + "/gsm/com", + "/gsm/rf", + "/gsm/rf/rx", + "/gsm/rf/tx", + "/pcm", + "/sys", + "/mmi", + "/var", + "/var/dbg", + "/aud", + "/etc", + 0 +}; + +create_std_dirs() +{ + char **dirp; + int rc; + + for (dirp = std_dir_list; *dirp; dirp++) { + rc = do_mkdir_existok(*dirp); + if (rc) + return(rc); + } + return(0); +}