mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-15 09:27:35 +00:00
d455d8789d
The sandbox/ext4/fat/generic fs commands do not gracefully deal with files greater than 2GB. Negative values are returned in such cases. To handle this, the fs functions have been modified to take an additional parameter of type "* loff_t" which is then populated. The return value of the fs functions are used only for error conditions. Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> [trini: Update board/gdsys/p1022/controlcenterd-id.c, drivers/fpga/zynqpl.c for changes] Signed-off-by: Tom Rini <trini@ti.com>
37 lines
1.4 KiB
C
37 lines
1.4 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);
|
|
|
|
int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,
|
|
loff_t maxsize, loff_t *actread);
|
|
int sandbox_fs_write_at(const char *filename, loff_t pos, void *buffer,
|
|
loff_t maxsize, loff_t *actwrite);
|
|
|
|
void sandbox_fs_close(void);
|
|
int sandbox_fs_ls(const char *dirname);
|
|
int sandbox_fs_exists(const char *filename);
|
|
int sandbox_fs_size(const char *filename, loff_t *size);
|
|
int fs_read_sandbox(const char *filename, void *buf, loff_t offset, loff_t len,
|
|
loff_t *actread);
|
|
int fs_write_sandbox(const char *filename, void *buf, loff_t offset,
|
|
loff_t len, loff_t *actwrite);
|
|
|
|
#endif
|