PERFORCE change 178284 for review

Garrett Cooper gcooper at FreeBSD.org
Sat May 15 04:39:43 UTC 2010


http://p4web.freebsd.org/@@178284?ac=10

Change 178284 by gcooper at starr-bastion on 2010/05/15 04:38:48

	Abbreviate unpack API names.

Affected files ...

.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/file.c#9 edit
.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/pkg.h#4 edit

Differences ...

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/file.c#9 (text+ko) ====

@@ -345,7 +345,7 @@
 
 /*
  * Unpack a single file, denoted by file, to a buffer; this call uses
- * unpack_file_to_fd to first open the file, and once that has been completed
+ * unpack_to_fd to first open the file, and once that has been completed
  * it opens the file and proceeds to read it into the buffer -- either
  * specified by buffer if buffer is not NULL, or attempts to allocate memory
  * which will need to be freed by the user at a later date.
@@ -354,14 +354,14 @@
  * returns NULL on failure.
  */
 char*
-unpack_file_to_buffer(char *buffer, const char *pkg, const char *file)
+unpack_to_buffer(char *buffer, const char *pkg, const char *file)
 {
 
 	FILE *fd = NULL;
 	char *buf = buffer;
 	struct stat sb;
 
-	if ((fd = unpack_file_to_fd(pkg, file)) != NULL) {
+	if ((fd = unpack_to_fd(pkg, file)) != NULL) {
 
 		if (fstat(fileno(fd), &sb) == 0) {
 
@@ -416,7 +416,7 @@
  * Return -1 on failure, a value greater than 0 on success.
  */
 FILE*
-unpack_file_to_fd(const char *pkg, const char *file)
+unpack_to_fd(const char *pkg, const char *file)
 {
 	struct archive *archive;
 	struct archive_entry *archive_entry;

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/pkg.h#4 (text+ko) ====

@@ -189,8 +189,9 @@
 void		copy_hierarchy(const char *, const char *, Boolean);
 int		delete_hierarchy(const char *, Boolean, Boolean);
 int		unpack(const char *, const char *);
-char*		unpack_file_to_buffer(char *, const char *, const char *);
-FILE*		unpack_file_to_fd(const char *, const char *);
+char*		unpack_to_buffer(struct archive *archive, const char *,
+		    const char *);
+FILE*		unpack_to_fd(const char *, const char *);
 void		format_cmd(char *, int, const char *, const char *, const char *);
 
 /* Msg */


More information about the p4-projects mailing list