summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/untar/untar.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-05-19 09:18:21 +1000
committerChris Johns <chrisj@rtems.org>2016-06-03 18:14:20 +1000
commitd84e346b26017f021c1a7d5c8ad078c7264240ab (patch)
tree7dfa3877038d32cfda1c0a5c6d3d02cd1328dbe9 /cpukit/libmisc/untar/untar.h
parentlibmisc/stackchk: Fix printk warnings. (diff)
downloadrtems-d84e346b26017f021c1a7d5c8ad078c7264240ab.tar.bz2
libmisc/untar: Support directory create and overwrites. Share the common code.
Support creating directories for files with a path depth greater than 1. Some tar files can have files with a path depth greater than 1 and no directory entry in the tar file to create a directory. Support overwriting existing files and directories failing in a similar way to tar on common hosts. If a file is replaced with a file delete the file and create a new file. If a directory replaces a file remove the file and create the directory. If a file replaces a directory remove the directory, and if the directory is not empty and cannot be removed report an error. If a directory alreday exists do nothing leaving the contents untouched. The untar code now shares the common header parsing and initial processing with the actual writes still separate. No changes to the IMFS have been made. Updates #2415. Closes #2207.
Diffstat (limited to '')
-rw-r--r--cpukit/libmisc/untar/untar.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/libmisc/untar/untar.h b/cpukit/libmisc/untar/untar.h
index c1f71dce00..d67c29e7f4 100644
--- a/cpukit/libmisc/untar/untar.h
+++ b/cpukit/libmisc/untar/untar.h
@@ -2,7 +2,7 @@
* @file
*
* @brief Untar an Image
- *
+ *
* This file defines the interface to methods which can untar an image.
*/
@@ -17,9 +17,12 @@
#ifndef _RTEMS_UNTAR_H
#define _RTEMS_UNTAR_H
+#include <stdbool.h>
#include <stddef.h>
#include <tar.h>
+#include <rtems/print.h>
+
/**
* @defgroup libmisc_untar_img Untar Image
*
@@ -37,7 +40,9 @@ extern "C" {
int Untar_FromMemory(void *tar_buf, size_t size);
+int Untar_FromMemory_Print(void *tar_buf, size_t size, const rtems_printer* printer);
int Untar_FromFile(const char *tar_name);
+int Untar_FromFile_Print(const char *tar_name, const rtems_printer* printer);
/**************************************************************************
* This converts octal ASCII number representations into an