CONFIGFS_ATTR_STRUCT(package_details);
#define PACKAGE_DETAILS_ATTR(_name, _mode, _show, _store) \
struct package_details_attribute package_details_attr_##_name = __CONFIGFS_ATTR(_name, _mode, _show, _store)
-#define PACKAGE_DETAILS_ATTRIBUTE(name) &package_details_attr_##name.attr
+#define PACKAGE_DETAILS_ATTRIBUTE(name) (&package_details_attr_##name.attr)
static ssize_t package_details_appid_show(struct package_details *package_details,
char *page)
#define PACKAGES_ATTR(_name, _mode, _show, _store) \
struct packages_attribute packages_attr_##_name = __CONFIGFS_ATTR(_name, _mode, _show, _store)
#define PACKAGES_ATTR_RO(_name, _show) \
-struct packages_attribute packages_attr_##_name = __CONFIGFS_ATTR_RO(_name, _show);
+struct packages_attribute packages_attr_##_name = __CONFIGFS_ATTR_RO(_name, _show)
static struct config_item *packages_make_item(struct config_group *group, const char *name)
{
* placed at the beginning of a function, right after variable declaration.
*/
#define OVERRIDE_CRED(sdcardfs_sbi, saved_cred, info) \
- saved_cred = override_fsids(sdcardfs_sbi, info); \
- if (!saved_cred) { return -ENOMEM; }
+ do { \
+ saved_cred = override_fsids(sdcardfs_sbi, info); \
+ if (!saved_cred) \
+ return -ENOMEM; \
+ } while (0)
#define OVERRIDE_CRED_PTR(sdcardfs_sbi, saved_cred, info) \
- saved_cred = override_fsids(sdcardfs_sbi, info); \
- if (!saved_cred) { return ERR_PTR(-ENOMEM); }
+ do { \
+ saved_cred = override_fsids(sdcardfs_sbi, info); \
+ if (!saved_cred) \
+ return ERR_PTR(-ENOMEM); \
+ } while (0)
#define REVERT_CRED(saved_cred) revert_fsids(saved_cred)
-#define DEBUG_CRED() \
- printk("KAKJAGI: %s:%d fsuid %d fsgid %d\n", \
- __FUNCTION__, __LINE__, \
- (int)current->cred->fsuid, \
- (int)current->cred->fsgid);
-
/* Android 5.0 support */
/* Permission mode for a specific node. Controls how file permissions