diff options
Diffstat (limited to 'fs/sdcardfs/multiuser.h')
| -rwxr-xr-x[-rw-r--r--] | fs/sdcardfs/multiuser.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/fs/sdcardfs/multiuser.h b/fs/sdcardfs/multiuser.h index 923ba101..b1016687 100644..100755 --- a/fs/sdcardfs/multiuser.h +++ b/fs/sdcardfs/multiuser.h @@ -1,36 +1,35 @@ /* * fs/sdcardfs/multiuser.h * - * Copyright (c) 2013 Samsung Electronics Co. Ltd - * Authors: Daeho Jeong, Woojoong Lee, Seunghwan Hyun, - * Sunghwan Yun, Sungjong Seo + * Copyright (c) 2015 Lenovo Co. Ltd + * Authors: liaohs , jixj * * This program has been developed as a stackable file system based on - * the WrapFS which written by + * 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 + * Copyright (c) 1998-2014 Erez Zadok + * Copyright (c) 2009 Shrikar Archak + * Copyright (c) 2003-2014 Stony Brook University + * Copyright (c) 2003-2014 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. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. */ #define MULTIUSER_APP_PER_USER_RANGE 100000 typedef uid_t userid_t; -typedef uid_t appid_t; +typedef long 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); } |
