]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Add canLrzip() utility to probe for existence of lrzip executable on this platform.
authorTim Kientzle <kientzle@acm.org>
Sun, 10 Jun 2012 00:56:21 +0000 (17:56 -0700)
committerTim Kientzle <kientzle@acm.org>
Sun, 10 Jun 2012 00:56:21 +0000 (17:56 -0700)
libarchive/test/main.c
libarchive/test/test.h

index a7fdbdcd15bb711184bf5d7bb2dfbbf7fe0ce676..214bbf0ed242305539fff95184543768b3928002 100644 (file)
@@ -1868,6 +1868,18 @@ canGunzip(void)
        return (value);
 }
 
+int
+canLrzip(void)
+{
+       static int tested = 0, value = 0;
+       if (!tested) {
+               tested = 1;
+               if (systemf("lrzip -V %s", redirectArgs) == 0)
+                       value = 1;
+       }
+       return (value);
+}
+
 /*
  * Can this filesystem handle nodump flags.
  */
index 9189670f0bbef6fc4db366fd967da0cd76a8d086..6c5de6a716318491979d6b6467ea8f95ef622e79 100644 (file)
@@ -272,6 +272,9 @@ int canGzip(void);
 /* Return true if this platform can run the "gunzip" program. */
 int canGunzip(void);
 
+/* Return true if this platform can run the "lrzip" program. */
+int canLrzip(void);
+
 /* Return true if this filesystem can handle nodump flags. */
 int canNodump(void);