2002-05-05 10:28:48 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002 by Daniel Stenberg <daniel@haxx.se>
|
|
|
|
*
|
|
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2003-02-14 23:50:17 +00:00
|
|
|
#ifndef ROCKBOX_FILE_H
|
|
|
|
#define ROCKBOX_FILE_H
|
|
|
|
|
2002-06-14 11:00:13 +00:00
|
|
|
#include <stdio.h>
|
2002-05-05 10:28:48 +00:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
2003-06-29 16:43:15 +00:00
|
|
|
int x11_open(const char *name, int opts);
|
2003-01-28 23:14:41 +00:00
|
|
|
int x11_close(int fd);
|
2003-03-18 00:39:57 +00:00
|
|
|
int x11_filesize(int fd);
|
2003-12-08 21:58:38 +00:00
|
|
|
int x11_creat(const char *name, mode_t mode);
|
2003-01-09 00:55:00 +00:00
|
|
|
int x11_remove(char *name);
|
2003-01-15 11:38:03 +00:00
|
|
|
int x11_rename(char *oldpath, char *newpath);
|
2002-06-14 11:00:13 +00:00
|
|
|
|
2003-06-29 16:43:15 +00:00
|
|
|
#ifndef NO_REDEFINES_PLEASE
|
2002-05-05 10:28:48 +00:00
|
|
|
#define open(x,y) x11_open(x,y)
|
2003-01-28 23:14:41 +00:00
|
|
|
#define close(x) x11_close(x)
|
2003-03-18 00:39:57 +00:00
|
|
|
#define filesize(x) x11_filesize(x)
|
2003-01-28 23:14:41 +00:00
|
|
|
#define creat(x,y) x11_creat(x,y)
|
2003-01-09 00:55:00 +00:00
|
|
|
#define remove(x) x11_remove(x)
|
2003-01-15 11:38:03 +00:00
|
|
|
#define rename(x,y) x11_rename(x,y)
|
2003-06-29 16:43:15 +00:00
|
|
|
#endif
|
2002-05-05 10:28:48 +00:00
|
|
|
|
2003-02-07 10:10:17 +00:00
|
|
|
#include "../../firmware/include/file.h"
|
2002-06-14 11:00:13 +00:00
|
|
|
|
2003-06-29 16:43:15 +00:00
|
|
|
int open(const char* pathname, int flags);
|
|
|
|
int close(int fd);
|
|
|
|
int printf(const char *format, ...);
|
|
|
|
int ftruncate(int fd, off_t length);
|
2003-07-01 23:43:29 +00:00
|
|
|
int fsync(int fd);
|
2003-02-14 23:50:17 +00:00
|
|
|
|
|
|
|
off_t lseek(int fildes, off_t offset, int whence);
|
|
|
|
ssize_t read(int fd, void *buf, size_t count);
|
2003-02-14 23:52:18 +00:00
|
|
|
ssize_t write(int fd, const void *buf, size_t count);
|
2003-02-14 23:50:17 +00:00
|
|
|
|
|
|
|
#endif
|