diff options
-rw-r--r-- | src/block/block.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/block/block.c b/src/block/block.c index f3de7d79..094a4d7a 100644 --- a/src/block/block.c +++ b/src/block/block.c @@ -97,6 +97,10 @@ /* Maximum number of thread */ #define THREAD_MAX 5 +#define PKGDIR_BUS_NAME "org.tizen.pkgdir_tool" +#define PKGDIR_PATH "/org/tizen/pkgdir_tool" +#define PKGDIR_INTERFACE "org.tizen.pkgdir_tool" + enum block_dev_operation { BLOCK_DEV_MOUNT, BLOCK_DEV_UNMOUNT, @@ -1126,8 +1130,11 @@ out: static int mount_start(struct block_device *bdev) { + DBusMessage *msg; + DBusError err; struct block_data *data; int r; + bool ret_val; assert(bdev); assert(bdev->data); @@ -1154,6 +1161,22 @@ static int mount_start(struct block_device *bdev) if (r < 0) _E("app2ext failed"); + msg = dbus_method_sync_with_reply(PKGDIR_BUS_NAME, PKGDIR_PATH, + PKGDIR_INTERFACE, "CreateExternalDirsForAllPkgs", + NULL, NULL); + if (!msg) { + _D("Fail to create external directory"); + goto out; + } + + dbus_error_init(&err); + + r = dbus_message_get_args(msg, &err, DBUS_TYPE_BOOLEAN, &ret_val, DBUS_TYPE_INVALID); + if (!r) { + _E("no message : [%s:%s]", err.name, err.message); + dbus_error_free(&err); + } + out: _I("%s result : %s, %d", __func__, data->devnode, r); |