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:
parent
6f2db92586
commit
497e393b31
1 changed files with 7 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue