if (!list)
return -EINVAL;
- result = dbus_handle_method_sync_with_reply_var(STORAGE_EXT_BUS_NAME,
+ ret = dbus_handle_method_sync_with_reply_var(STORAGE_EXT_BUS_NAME,
STORAGE_EXT_PATH_MANAGER,
STORAGE_EXT_IFACE_MANAGER,
STORAGE_EXT_GET_LIST,
- g_variant_new("(s)", "all"));
- if (!result) {
+ g_variant_new("(s)", "all"),
+ &result);
+ if (ret < 0) {
_E("Failed to get storage_ext device info"); //LCOV_EXCL_LINE
return -EIO;
}
int storage_ext_get_statvfs(char *path, struct statvfs_32 *buf)
{
GVariant *result;
+ int ret;
guint64 bsize, frsize, blocks, bfree, bavail, files, ffree, favail, fsid, flag, namemax;
assert(buf);
memset(buf, 0, sizeof(struct statvfs_32));
- result = dbus_handle_method_sync_with_reply_var(STORAGE_EXT_BUS_NAME,
+ ret = dbus_handle_method_sync_with_reply_var(STORAGE_EXT_BUS_NAME,
STORAGE_EXT_PATH_STORAGE,
STORAGE_EXT_IFACE_STORAGE,
STORAGE_EXT_GET_STATVFS,
- g_variant_new("(s)", path));
- if (!result) {
+ g_variant_new("(s)", path),
+ &result);
+ if (ret < 0) {
_E("Failed to get storage_ext device info"); //LCOV_EXCL_LINE
return -EIO;
}
int storage_ext_get_statvfs_size64(char *path, struct statvfs *buf)
{
GVariant *result;
+ int ret;
assert(buf);
memset(buf, 0, sizeof(struct statvfs));
- result = dbus_handle_method_sync_with_reply_var(STORAGE_EXT_BUS_NAME,
+ ret = dbus_handle_method_sync_with_reply_var(STORAGE_EXT_BUS_NAME,
STORAGE_EXT_PATH_STORAGE,
STORAGE_EXT_IFACE_STORAGE,
STORAGE_EXT_GET_STATVFS,
- g_variant_new("(s)", path));
- if (!result) {
+ g_variant_new("(s)", path),
+ &result);
+ if (ret < 0) {
_E("Failed to get storage_ext device info"); //LCOV_EXCL_LINE
return -EIO;
}
int storage_ext_get_storage_level(const char *path, char **level)
{
GVariant *result;
+ int ret;
char *tmp;
enum tzplatform_variable id;
return -EINVAL;
}
- result = dbus_handle_method_sync_with_reply_var(STORAGE_EXT_BUS_NAME,
+ ret = dbus_handle_method_sync_with_reply_var(STORAGE_EXT_BUS_NAME,
STORAGE_EXT_PATH_STORAGE,
STORAGE_EXT_IFACE_STORAGE,
STORAGE_EXT_GET_STORAGE_LEVEL,
- g_variant_new("(i)", id));
- if (!result) {
+ g_variant_new("(i)", id),
+ &result);
+ if (ret < 0) {
_E("Failed to get %d level", id);
return -EIO;
}
GVariant *result;
int ret;
- result = dbus_handle_method_sync_with_reply_var(STORAGE_EXT_BUS_NAME,
+ ret = dbus_handle_method_sync_with_reply_var(STORAGE_EXT_BUS_NAME,
STORAGE_EXT_PATH_MANAGER,
STORAGE_EXT_IFACE_MANAGER,
"GetDeviceInfo",
- g_variant_new("(i)", storage_id));
- if (!result) {
+ g_variant_new("(i)", storage_id),
+ &result);
+ if (ret < 0) {
_E("There is no storage with the storage id (%d)", storage_id); //LCOV_EXCL_LINE
return -ENODEV;
}