From c03e01879e4dc13d8ecc999b97350e683fa5cf06 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Sat, 24 Nov 2012 00:54:01 +0100 Subject: cal: Added CAL parser from Calvaria --- src/cal.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/cal.h (limited to 'src/cal.h') diff --git a/src/cal.h b/src/cal.h new file mode 100644 index 0000000..e87b8dc --- /dev/null +++ b/src/cal.h @@ -0,0 +1,35 @@ +/* + 0xFFFF - Open Free Fiasco Firmware Flasher + Copyright (c) 2011 Michael Buesch + Copyright (C) 2012 Pali Rohár + + 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 3 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, see . + +*/ + +#ifndef CAL_H +#define CAL_H + +#define CAL_MAX_NAME_LEN 16 +#define CAL_FLAG_USER 0x0001 +#define CAL_FLAG_WRITE_ONCE 0x0002 + +struct cal; + +int cal_init(struct cal ** cal_out); +int cal_init_file(const char * file, struct cal ** cal_out); +void cal_finish(struct cal * cal); +int cal_read_block(struct cal * cal, const char * name, void ** ptr, unsigned long * len, unsigned long flags); + +#endif -- cgit v1.2.3