Message ID | 1316206180-6375-12-git-send-email-sandeen@redhat.com |
---|---|
State | Accepted, archived |
Headers | show |
On Fri, Sep 16, 2011 at 03:49:26PM -0500, Eric Sandeen wrote: > The EOPNOTSUPP case is unreachable, being outside a set of: > #if > ... > return; > #else > ... > return; > #endif > > Fix this up so that if neither HAVE_CHFLAGS nor > HAVE_EXT2_IOCTLS applies, we set EOPNOTSUPP. > > Signed-off-by: Eric Sandeen <sandeen@redhat.com> Applied, thanks. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/lib/e2p/setflags.c b/lib/e2p/setflags.c index 72cf441..b203606 100644 --- a/lib/e2p/setflags.c +++ b/lib/e2p/setflags.c @@ -55,7 +55,7 @@ int setflags (int fd, unsigned long flags) #endif return fchflags (fd, bsd_flags); -#else +#else /* ! HAVE_CHFLAGS */ #if HAVE_EXT2_IOCTLS struct stat buf; int f; @@ -68,8 +68,9 @@ int setflags (int fd, unsigned long flags) f = (int) flags; return ioctl(fd, EXT2_IOC_SETFLAGS, &f); -#endif /* HAVE_EXT2_IOCTLS */ -#endif +#else errno = EOPNOTSUPP; return -1; +#endif /* HAVE_EXT2_IOCTLS */ +#endif /* HAVE_CHFLAGS */ }
The EOPNOTSUPP case is unreachable, being outside a set of: #if ... return; #else ... return; #endif Fix this up so that if neither HAVE_CHFLAGS nor HAVE_EXT2_IOCTLS applies, we set EOPNOTSUPP. Signed-off-by: Eric Sandeen <sandeen@redhat.com> --- lib/e2p/setflags.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)