Added const to constant arguments
This commit is contained in:
parent
bf8b5c093d
commit
af73a358f4
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: cfs-eeprom.c,v 1.6 2008/01/09 08:12:52 adamdunkels Exp $
|
||||
* $Id: cfs-eeprom.c,v 1.7 2008/01/24 13:08:35 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
#include "cfs/cfs.h"
|
||||
|
@ -94,7 +94,7 @@ cfs_read(int f, void *buf, unsigned int len)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
cfs_write(int f, void *buf, unsigned int len)
|
||||
cfs_write(int f, const void *buf, unsigned int len)
|
||||
{
|
||||
if(f == 1) {
|
||||
eeprom_write(CFS_EEPROM_OFFSET + file.fileptr, buf, len);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: cfs-posix.c,v 1.9 2008/01/08 14:27:06 adamdunkels Exp $
|
||||
* $Id: cfs-posix.c,v 1.10 2008/01/24 13:08:35 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -75,7 +75,7 @@ cfs_read(int f, void *b, unsigned int l)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
cfs_write(int f, void *b, unsigned int l)
|
||||
cfs_write(int f, const void *b, unsigned int l)
|
||||
{
|
||||
return write(f, b, l);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: cfs-ram.c,v 1.6 2008/01/08 14:27:06 adamdunkels Exp $
|
||||
* $Id: cfs-ram.c,v 1.7 2008/01/24 13:08:35 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
@ -106,7 +106,7 @@ cfs_read(int f, void *buf, unsigned int len)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
cfs_write(int f, void *buf, unsigned int len)
|
||||
cfs_write(int f, const void *buf, unsigned int len)
|
||||
{
|
||||
printf("write file.fileptr %d len %d filesize %d\n",
|
||||
file.fileptr, len, file.filesize);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: cfs-xmem.c,v 1.7 2008/01/08 14:27:06 adamdunkels Exp $
|
||||
* $Id: cfs-xmem.c,v 1.8 2008/01/24 13:08:35 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
#include "cfs/cfs.h"
|
||||
|
@ -110,7 +110,7 @@ cfs_read(int f, void *buf, unsigned int len)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
cfs_write(int f, void *buf, unsigned int len)
|
||||
cfs_write(int f, const void *buf, unsigned int len)
|
||||
{
|
||||
if(file.fileptr >= CFS_XMEM_SIZE) {
|
||||
return 0;
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: cfs.h,v 1.10 2008/01/08 14:27:06 adamdunkels Exp $
|
||||
* $Id: cfs.h,v 1.11 2008/01/24 13:08:35 adamdunkels Exp $
|
||||
*/
|
||||
#ifndef __CFS_H__
|
||||
#define __CFS_H__
|
||||
|
@ -172,7 +172,7 @@ CCIF int cfs_read(int fd, void *buf, unsigned int len);
|
|||
* cfs_open() and the CFS_WRITE flag.
|
||||
*/
|
||||
#ifndef cfs_write
|
||||
CCIF int cfs_write(int fd, void *buf, unsigned int len);
|
||||
CCIF int cfs_write(int fd, const void *buf, unsigned int len);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue