Remove duplicate prepend_mountpoint() functions.
[petitboot] / devices / udev-helper.c
index c113e55432177217c7fc144ded1b9e4ddc11ce69..da12129316142814462162674d4e7aabdd69513f 100644 (file)
@@ -568,3 +568,19 @@ int main(int argc, char **argv)
        }
        return rc;
 }
+
+/* convenience function for parsers */
+char *join_paths(const char *a, const char *b)
+{
+       char *full_path;
+
+       full_path = malloc(strlen(a) + strlen(b) + 2);
+
+       strcpy(full_path, a);
+       if (b[0] != '/')
+               strcat(full_path, "/");
+       strcat(full_path, b);
+
+       return full_path;
+}
+