mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-09-08 09:08:05 -04:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
37
fs/sdcardfs/multiuser.h
Normal file
37
fs/sdcardfs/multiuser.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* fs/sdcardfs/multiuser.h
|
||||
*
|
||||
* Copyright (c) 2013 Samsung Electronics Co. Ltd
|
||||
* Authors: Daeho Jeong, Woojoong Lee, Seunghwan Hyun,
|
||||
* Sunghwan Yun, Sungjong Seo
|
||||
*
|
||||
* This program has been developed as a stackable file system based on
|
||||
* the WrapFS which written by
|
||||
*
|
||||
* Copyright (c) 1998-2011 Erez Zadok
|
||||
* Copyright (c) 2009 Shrikar Archak
|
||||
* Copyright (c) 2003-2011 Stony Brook University
|
||||
* Copyright (c) 2003-2011 The Research Foundation of SUNY
|
||||
*
|
||||
* This file is dual licensed. It may be redistributed and/or modified
|
||||
* under the terms of the Apache 2.0 License OR version 2 of the GNU
|
||||
* General Public License.
|
||||
*/
|
||||
|
||||
#define MULTIUSER_APP_PER_USER_RANGE 100000
|
||||
|
||||
typedef uid_t userid_t;
|
||||
typedef uid_t appid_t;
|
||||
|
||||
static inline userid_t multiuser_get_user_id(uid_t uid) {
|
||||
return uid / MULTIUSER_APP_PER_USER_RANGE;
|
||||
}
|
||||
|
||||
static inline appid_t multiuser_get_app_id(uid_t uid) {
|
||||
return uid % MULTIUSER_APP_PER_USER_RANGE;
|
||||
}
|
||||
|
||||
static inline uid_t multiuser_get_uid(userid_t userId, appid_t appId) {
|
||||
return userId * MULTIUSER_APP_PER_USER_RANGE + (appId % MULTIUSER_APP_PER_USER_RANGE);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue