X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libcfs%2Finclude%2Flibcfs%2Fcurproc.h;h=0f00c7219e75dc6933785ad2218edc4a0939d885;hb=0d27288609dbebca431d2be7c79397a14ab7d84c;hp=d5530fc2f66885a161585fd4798ae6d1b2c918bd;hpb=60b5c3e464d6b4b333506e6db6b0635bb5a06577;p=fs%2Flustre-release.git diff --git a/libcfs/include/libcfs/curproc.h b/libcfs/include/libcfs/curproc.h index d5530fc..0f00c72 100644 --- a/libcfs/include/libcfs/curproc.h +++ b/libcfs/include/libcfs/curproc.h @@ -15,17 +15,15 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. + * + * Copyright (c) 2012, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -41,40 +39,9 @@ #ifndef __LIBCFS_CURPROC_H__ #define __LIBCFS_CURPROC_H__ -#ifdef __KERNEL__ -/* - * Portable API to access common characteristics of "current" UNIX process. - * - * Implemented in portals/include/libcfs// - */ -uid_t cfs_curproc_uid(void); -gid_t cfs_curproc_gid(void); -uid_t cfs_curproc_euid(void); -gid_t cfs_curproc_egid(void); -uid_t cfs_curproc_fsuid(void); -gid_t cfs_curproc_fsgid(void); -pid_t cfs_curproc_pid(void); -int cfs_curproc_groups_nr(void); -int cfs_curproc_is_in_groups(gid_t group); -void cfs_curproc_groups_dump(gid_t *array, int size); -mode_t cfs_curproc_umask(void); -char *cfs_curproc_comm(void); - - -/* - * Plus, platform-specific constant - * - * CFS_CURPROC_COMM_MAX, - * - * and opaque scalar type - * - * cfs_kernel_cap_t - */ - /* check if task is running in compat mode.*/ -int cfs_curproc_is_32bit(void); -int cfs_get_environ(const char *key, char *value, int *val_len); -#endif +#define current_pid() (current->pid) +#define current_comm() (current->comm) typedef __u32 cfs_cap_t;