Author: myles
Date: 2008-02-25 17:06:36 +0100 (Mon, 25 Feb 2008)
New Revision: 618

Modified:
   coreboot-v3/util/lar/lar.c
   coreboot-v3/util/lar/lib.c
Log:
This is a simple patch which corrects directory handling for add
(makes it the same as create.)

Without this patch you can create a lar and recursively add a
directory to it, but you can't add one with add.

Another patch might be to make lar -l print something when you use the
directory option, but I'm not sure what was intended originally.

Myles

Signed-off-by: Myles Watson <[EMAIL PROTECTED]>
Acked-by: Peter Stuge <[EMAIL PROTECTED]>



Modified: coreboot-v3/util/lar/lar.c
===================================================================
--- coreboot-v3/util/lar/lar.c  2008-02-23 16:31:50 UTC (rev 617)
+++ coreboot-v3/util/lar/lar.c  2008-02-25 16:06:36 UTC (rev 618)
@@ -370,13 +370,13 @@
                exit(1);
        }
 
-       /* when a new archive is created, recurse over
-        * physical files when a directory is found.
+       /* when a new archive is created or added to, recurse over
+        * the physical files when a directory is found.
         * Otherwise just add the directory to the match list
         */
 
        while (optind < argc) {
-               if (larmode == CREATE) {
+               if (larmode == CREATE || larmode == ADD) {
                        add_files(argv[optind++]);
                } else
                        add_file_or_directory(argv[optind++]);

Modified: coreboot-v3/util/lar/lib.c
===================================================================
--- coreboot-v3/util/lar/lib.c  2008-02-23 16:31:50 UTC (rev 617)
+++ coreboot-v3/util/lar/lib.c  2008-02-25 16:06:36 UTC (rev 618)
@@ -223,7 +223,7 @@
 
 /*
  * Add physically existing files to the file list. 
- * This function is used when an archive is created.
+ * This function is used when an archive is created or added to.
  */
 
 int add_files(const char *name)


-- 
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to