Author: stepan
Date: 2007-08-20 19:55:32 +0200 (Mon, 20 Aug 2007)
New Revision: 477

Modified:
   LinuxBIOSv3/util/lar/lib.c
Log:
Fixes nocompress:-handling in lar

Signed-off-by: Patrick Georgi <[EMAIL PROTECTED]>
Acked-by: Stefan Reinauer <[EMAIL PROTECTED]>



Modified: LinuxBIOSv3/util/lar/lib.c
===================================================================
--- LinuxBIOSv3/util/lar/lib.c  2007-08-20 00:48:06 UTC (rev 476)
+++ LinuxBIOSv3/util/lar/lib.c  2007-08-20 17:55:32 UTC (rev 477)
@@ -208,21 +208,17 @@
        char *c;
 
        if (strstr(name, "nocompress:") == name) {
-               name += 11;
+               free(realname);
+               realname = strdup(name + 11);
+       } else {
+               realname = strdup(name);
        }
 
-       realname = strdup(name);
-
        if (realname == NULL) {
          fprintf(stderr, "Out of memory.\n");
          exit(1);
        }
 
-       c = strchr(realname, ':');
-
-       if (c != NULL)
-         *c = '\0';
-
        /* printf("... add_files %s\n", name); */
        if (stat(realname, &filestat) == -1) {
                fprintf(stderr, "Error getting file attributes of %s\n", name);


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

Reply via email to