Al Viro wrote:
> At least 3 versions, unless you want to mess with ifdefs to reduce them to
> two.
I don't think you need to do fancy #ifdef's:
static s32 return_eio_32(void) { return -EIO; }
static s64 return_eio_64(void) { return -EIO; }
extern void return_eio_unknown(void); /* Doesn't exist */
#define return_eio(type) ((sizeof(type) == 4) \
? ((void *) return_eio_32) \
: ((sizeof(type) == 8) \
? ((void *) return_eio_64) \
: ((void *) return_eio_unknown)))
-Mitch
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
- From: Andrew Morton <[email protected]>
- Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
- From: Linus Torvalds <[email protected]>
- Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
- From: Al Viro <[email protected]>
- Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
- From: Linus Torvalds <[email protected]>
- Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
- From: Al Viro <[email protected]>
- Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
- From: Al Viro <[email protected]>
- Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
- Prev by Date: Re: S.M.A.R.T no longer available in 2.6.20-rc2-mm2 with libata
- Next by Date: Re: open(O_DIRECT) on a tmpfs?
- Previous by thread: Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
- Next by thread: Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
- Index(es):
![]() |
