cfs-coffee: examples: Fix coding style

This commit is contained in:
Antonio Lignan 2016-01-29 20:56:34 +01:00 committed by Benoît Thébaudeau
parent 4ed5c50a4e
commit e23c175699
3 changed files with 23 additions and 26 deletions

View file

@ -28,23 +28,23 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
*/ */
/*---------------------------------------------------------------------------*/
/** /**
* \file * \file
* Example on how to use CFS/Coffee. * Example on how to use CFS/Coffee.
* \author * \author
* Nicolas Tsiftes <nvt@sics.se> * Nicolas Tsiftes <nvt@sics.se>
*/ */
/*---------------------------------------------------------------------------*/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "contiki.h" #include "contiki.h"
#include "cfs/cfs.h" #include "cfs/cfs.h"
#include "cfs/cfs-coffee.h" #include "cfs/cfs-coffee.h"
/*---------------------------------------------------------------------------*/
PROCESS(example_coffee_process, "Coffee example"); PROCESS(example_coffee_process, "Coffee example");
AUTOSTART_PROCESSES(&example_coffee_process); AUTOSTART_PROCESSES(&example_coffee_process);
/*---------------------------------------------------------------------------*/
#define FILENAME "test" #define FILENAME "test"
/* Formatting is needed if the storage device is in an unknown state; /* Formatting is needed if the storage device is in an unknown state;
@ -52,7 +52,7 @@ AUTOSTART_PROCESSES(&example_coffee_process);
#ifndef NEED_FORMATTING #ifndef NEED_FORMATTING
#define NEED_FORMATTING 0 #define NEED_FORMATTING 0
#endif #endif
/*---------------------------------------------------------------------------*/
static int static int
file_test(const char *filename, char *msg) file_test(const char *filename, char *msg)
{ {
@ -133,7 +133,7 @@ file_test(const char *filename, char *msg)
return 1; return 1;
} }
/*---------------------------------------------------------------------------*/
static int static int
dir_test(void) dir_test(void)
{ {
@ -156,7 +156,7 @@ dir_test(void)
return 1; return 1;
} }
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(example_coffee_process, ev, data) PROCESS_THREAD(example_coffee_process, ev, data)
{ {
PROCESS_BEGIN(); PROCESS_BEGIN();

View file

@ -29,19 +29,18 @@
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
*/ */
/*---------------------------------------------------------------------------*/
/** /**
* \file * \file
* A quick program for testing the CFS xmem driver * A quick program for testing the CFS xmem driver
* \author * \author
* Adam Dunkels <adam@sics.se> * Adam Dunkels <adam@sics.se>
*/ */
/*---------------------------------------------------------------------------*/
#include "contiki.h" #include "contiki.h"
#include "cfs/cfs.h" #include "cfs/cfs.h"
#include <stdio.h> #include <stdio.h>
/*---------------------------------------------------------------------------*/
PROCESS(cfs_process, "Test CFS process"); PROCESS(cfs_process, "Test CFS process");
AUTOSTART_PROCESSES(&cfs_process); AUTOSTART_PROCESSES(&cfs_process);
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View file

@ -29,14 +29,14 @@
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
*/ */
/*---------------------------------------------------------------------------*/
/** /**
* \file * \file
* Basic test for CFS/Coffee. * Basic test for CFS/Coffee.
* \author * \author
* Nicolas Tsiftes <nvt@sics.se> * Nicolas Tsiftes <nvt@sics.se>
*/ */
/*---------------------------------------------------------------------------*/
#include "contiki.h" #include "contiki.h"
#include "cfs/cfs.h" #include "cfs/cfs.h"
#include "cfs/cfs-coffee.h" #include "cfs/cfs-coffee.h"
@ -45,14 +45,12 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
/*---------------------------------------------------------------------------*/
PROCESS(testcoffee_process, "Test CFS/Coffee process"); PROCESS(testcoffee_process, "Test CFS/Coffee process");
AUTOSTART_PROCESSES(&testcoffee_process); AUTOSTART_PROCESSES(&testcoffee_process);
/*---------------------------------------------------------------------------*/
#define TEST_FAIL(x) error = (x); goto end; #define TEST_FAIL(x) error = (x); goto end;
#define FILE_SIZE 4096 #define FILE_SIZE 4096
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static int static int
coffee_test_basic(void) coffee_test_basic(void)