mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 14:10:43 +00:00
7eb2c8d573
This allows write of files from the host filesystem in sandbox. There is currently no concept of overwriting the file and removing its existing contents - all writing is done on top of what is there. This means that writing 10 bytes to the start of a 1KB file will only update those 10 bytes, not truncate the file to 10 byte slong. If the file does not exist it is created. Signed-off-by: Simon Glass <sjg@chromium.org>
31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
/*
|
|
* Copyright (c) 2012, Google Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
*/
|
|
|
|
#ifndef __SANDBOX_FS__
|
|
#define __SANDBOX_FS__
|
|
|
|
int sandbox_fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info);
|
|
|
|
long sandbox_fs_read_at(const char *filename, unsigned long pos,
|
|
void *buffer, unsigned long maxsize);
|
|
|
|
void sandbox_fs_close(void);
|
|
int sandbox_fs_ls(const char *dirname);
|
|
int fs_read_sandbox(const char *filename, void *buf, int offset, int len);
|
|
int fs_write_sandbox(const char *filename, void *buf, int offset, int len);
|
|
|
|
#endif
|