RTEMS CPU Kit with SuperCore  4.11.3
untar.h
Go to the documentation of this file.
1 
9 /*
10  * Written by: Jake Janovetz <janovetz@tempest.ece.uiuc.edu>
11  *
12  * The license and distribution terms for this file may be
13  * found in the file LICENSE in this distribution or at
14  * http://www.rtems.org/license/LICENSE.
15  */
16 
17 #ifndef _RTEMS_UNTAR_H
18 #define _RTEMS_UNTAR_H
19 
20 #include <stddef.h>
21 #include <tar.h>
22 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #define UNTAR_SUCCESSFUL 0
34 #define UNTAR_FAIL 1
35 #define UNTAR_INVALID_CHECKSUM 2
36 #define UNTAR_INVALID_HEADER 3
37 
38 
39 int Untar_FromMemory(void *tar_buf, size_t size);
40 int Untar_FromFile(const char *tar_name);
41 
42 /**************************************************************************
43  * This converts octal ASCII number representations into an
44  * unsigned long. Only support 32-bit numbers for now.
45  *************************************************************************/
46 extern unsigned long
47 _rtems_octal2ulong(const char *octascii, size_t len);
48 
49 /************************************************************************
50  * Compute the TAR checksum and check with the value in
51  * the archive. The checksum is computed over the entire
52  * header, but the checksum field is substituted with blanks.
53  ************************************************************************/
54 extern int
55 _rtems_tar_header_checksum(const char *bufr);
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* _RTEMS_UNTAR_H */