mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
ANDROID: sdcardfs: Use to kstrout
Switch from deprecated simple_strtoul to kstrout Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35331000 Change-Id: If18bd133b4d2877f71e58b58fc31371ff6613ed5
This commit is contained in:
committed by
Amit Pundir
parent
f52be24bd9
commit
91006b3837
@@ -60,6 +60,8 @@ void get_derived_permission_new(struct dentry *parent, struct dentry *dentry,
|
||||
struct sdcardfs_inode_info *info = SDCARDFS_I(d_inode(dentry));
|
||||
struct sdcardfs_inode_info *parent_info = SDCARDFS_I(d_inode(parent));
|
||||
appid_t appid;
|
||||
unsigned long user_num;
|
||||
int err;
|
||||
struct qstr q_Android = QSTR_LITERAL("Android");
|
||||
struct qstr q_data = QSTR_LITERAL("data");
|
||||
struct qstr q_obb = QSTR_LITERAL("obb");
|
||||
@@ -88,7 +90,11 @@ void get_derived_permission_new(struct dentry *parent, struct dentry *dentry,
|
||||
case PERM_PRE_ROOT:
|
||||
/* Legacy internal layout places users at top level */
|
||||
info->perm = PERM_ROOT;
|
||||
info->userid = simple_strtoul(name->name, NULL, 10);
|
||||
err = kstrtoul(name->name, 10, &user_num);
|
||||
if (err)
|
||||
info->userid = 0;
|
||||
else
|
||||
info->userid = user_num;
|
||||
set_top(info, &info->vfs_inode);
|
||||
break;
|
||||
case PERM_ROOT:
|
||||
|
||||
Reference in New Issue
Block a user