X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=include%2Ffat.h;h=c8eb7ccd2904c2e9977b252f4234d20854e29501;hb=01286329b27b27eaeda045b469d41b1d9fce545a;hp=706cd7a4bd3467444d3b870bad8ac23743a5ad3a;hpb=5bb3505fa867ded03cbee83f7722ab5182930637;p=karo-tx-uboot.git diff --git a/include/fat.h b/include/fat.h index 706cd7a4bd..c8eb7ccd29 100644 --- a/include/fat.h +++ b/include/fat.h @@ -4,24 +4,7 @@ * 2002-07-28 - rjones@nexus-tech.net - ported to ppcboot v1.1.6 * 2003-03-10 - kharris@nexus-tech.net - ported to u-boot * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * 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., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - * + * SPDX-License-Identifier: GPL-2.0+ */ #ifndef _FAT_H_ @@ -98,9 +81,6 @@ #endif #endif -#define TOLOWER(c) if((c) >= 'A' && (c) <= 'Z'){(c)+=('a' - 'A');} -#define TOUPPER(c) if ((c) >= 'a' && (c) <= 'z') \ - (c) -= ('a' - 'A'); #define START(dent) (FAT2CPU16((dent)->start) \ + (mydata->fatsize != 32 ? 0 : \ (FAT2CPU16((dent)->starthi) << 16))) @@ -208,6 +188,7 @@ file_read_func file_fat_read; int file_cd(const char *path); int file_fat_detectfs(void); int file_fat_ls(const char *dir); +int fat_exists(const char *filename); long file_fat_read_at(const char *filename, unsigned long pos, void *buffer, unsigned long maxsize); long file_fat_read(const char *filename, void *buffer, unsigned long maxsize); @@ -216,4 +197,6 @@ int fat_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info); int fat_register_device(block_dev_desc_t *dev_desc, int part_no); int file_fat_write(const char *filename, void *buffer, unsigned long maxsize); +int fat_read_file(const char *filename, void *buf, int offset, int len); +void fat_close(void); #endif /* _FAT_H_ */