X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=libcfs%2Finclude%2Flibcfs%2Fposix%2Flibcfs.h;h=305b74bc01eaf68c9edca932456695f8cb793208;hb=c8fd9c3c38a66ab3dd479c48e0168577a4ff960e;hp=95ec2ab5a2947f86f6dec88ad09044247be79f90;hpb=3bffa4d32bc5b0bc71ba6873e262ddbca436bae1;p=fs%2Flustre-release.git diff --git a/libcfs/include/libcfs/posix/libcfs.h b/libcfs/include/libcfs/posix/libcfs.h index 95ec2ab..305b74b 100644 --- a/libcfs/include/libcfs/posix/libcfs.h +++ b/libcfs/include/libcfs/posix/libcfs.h @@ -27,7 +27,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, Intel Corporation. + * Copyright (c) 2012, 2013, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -110,6 +110,7 @@ typedef unsigned long long cfs_cycles_t; #define IS_ERR(a) ((unsigned long)(a) > (unsigned long)-1000L) +#define IS_ERR_VALUE(a) (IS_ERR(a)) #define PTR_ERR(a) ((long)(a)) #define ERR_PTR(a) ((void*)((long)(a))) @@ -120,14 +121,8 @@ typedef unsigned long long cfs_cycles_t; #include #endif -typedef struct file cfs_file_t; -typedef struct dentry cfs_dentry_t; -#ifdef __linux__ -typedef struct dirent64 cfs_dirent_t; -#endif - -#define cfs_get_fd(x) NULL -#define cfs_put_file(f) do {} while (0) +#define fget(x) NULL +#define fput(f) do {} while (0) #ifdef __linux__ /* Userpace byte flipping */ @@ -496,9 +491,10 @@ static inline void rb_link_node(struct rb_node *node, struct rb_node *parent, typedef ssize_t (*read_actor_t)(); -#define CFS_IFSHIFT 12 - -#define CFS_IFTODT(type) (((type) & S_IFMT) >> CFS_IFSHIFT) -#define CFS_DTTOIF(dirtype) ((dirtype) << CFS_IFSHIFT) +# ifndef IFTODT +# define IFSHIFT 12 +# define IFTODT(type) (((type) & S_IFMT) >> IFSHIFT) +# define DTTOIF(dirtype) ((dirtype) << IFSHIFT) +# endif #endif