#define COMPAT_DIR "/opt/usr/media"
int is_compat_bind_mount(void);
+int storage_ext_is_supported(void);
#ifdef __cplusplus
}
* limitations under the License.
*/
-
+#include <unistd.h>
#include <libmount.h>
#include "common.h"
+#define BLOCK_CONF_FILE "/etc/storaged/block.conf"
+
int is_compat_bind_mount(void)
{
struct libmnt_table *t = NULL;
return 0;
//LCOV_EXCL_STOP
}
+
+int storage_ext_is_supported(void)
+{
+ static int support = -1;
+
+ if (support >= 0)
+ return support;
+
+ if (access(BLOCK_CONF_FILE, R_OK) == 0)
+ support = 1;
+ else
+ support = 0;
+
+ return support;
+}
+
if (!storage_id || !path)
return STORAGE_ERROR_INVALID_PARAMETER;
+ if (!storage_ext_is_supported())
+ return STORAGE_ERROR_NO_DEVICE;
+
result = dbus_method_call_sync(STORAGE_EXT_BUS_NAME,
STORAGE_EXT_PATH_MANAGER,
STORAGE_EXT_IFACE_MANAGER,
#include "log.h"
#include "storage-external.h"
-#define BLOCK_CONF_FILE "/etc/storaged/block.conf"
#define USER_UID_START 5000
const char *dir_path[STORAGE_DIRECTORY_MAX];
DD_LIST_REMOVE(st_int_head, st);
}
-int storage_ext_is_supported(void)
-{
- static int support = -1;
-
- if (support >= 0)
- return support;
-
- if (access(BLOCK_CONF_FILE, R_OK) == 0)
- support = 1;
- else
- support = 0;
-
- return support;
-}
-
API int storage_foreach_device_supported(storage_device_supported_cb callback, void *user_data)
{
const struct storage_ops *st;