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

View file

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

View file

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