]> git.ipfire.org Git - people/ms/pakfire.git/blobdiff - src/libpakfire/mount.c
mount: Make changing mount operation not dependant on pakfire
[people/ms/pakfire.git] / src / libpakfire / mount.c
index 403d421448e8488b656f46defd60c7f17061b013..494c25852921b3dd166f6ccc91933449586a508d 100644 (file)
@@ -32,6 +32,7 @@
 #include <pakfire/arch.h>
 #include <pakfire/logging.h>
 #include <pakfire/pakfire.h>
+#include <pakfire/path.h>
 #include <pakfire/mount.h>
 #include <pakfire/string.h>
 #include <pakfire/util.h>
@@ -143,12 +144,12 @@ static const struct pakfire_symlink {
        { NULL },
 };
 
-int pakfire_mount_change_propagation(struct pakfire* pakfire, int propagation, const char* path) {
-       DEBUG(pakfire, "Changing mount propagation on %s\n", path);
+int pakfire_mount_change_propagation(struct pakfire_ctx* ctx, const char* path, int propagation) {
+       CTX_DEBUG(ctx, "Changing mount propagation on %s\n", path);
 
        int r = mount(NULL, path, NULL, propagation|MS_REC, NULL);
        if (r)
-               ERROR(pakfire, "Failed to change mount propagation on %s: %m\n", path);
+               CTX_ERROR(ctx, "Failed to change mount propagation on %s: %m\n", path);
 
        return r;
 }
@@ -404,7 +405,7 @@ int pakfire_mount_all(struct pakfire* pakfire, int flags) {
 
        for (const struct pakfire_mountpoint* mp = mountpoints; mp->source; mp++) {
                // Figure out where to mount
-               r = pakfire_path_join(target, root, mp->target);
+               r = pakfire_path_append(target, root, mp->target);
                if (r)
                        return r;