diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-03-26 22:51:09 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-03-26 22:51:09 -0700 |
commit | a1006762fa6f98750bb77d76dd992cb8ea9f9c99 (patch) | |
tree | 5ddca741098ad3dd1e6b083becf1f5a9890641f0 /libinstaller/syslxcom.c | |
parent | c709a3982b1e6fa09537dd606b0557572e7bec8f (diff) | |
download | syslinux-4.06-pre3.tar.gz syslinux-4.06-pre3.tar.xz syslinux-4.06-pre3.zip |
libinstaller: Avoid using <linux/ext2_fs.h>syslinux-4.06-pre3
Don't use <linux/ext2_fs.h> if we can avoid it.
The ioctl constants have been globalized and moved to <linux/fs.h>.
Use a private copy of ext2_fs.h from e2fsprogs with the ioctl
constants removed for the data structures.
Do at least attempt backward compatibility for old kernel headers, but
no real hope of proper operation there...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'libinstaller/syslxcom.c')
-rw-r--r-- | libinstaller/syslxcom.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libinstaller/syslxcom.c b/libinstaller/syslxcom.c index 651f982d..57f13cda 100644 --- a/libinstaller/syslxcom.c +++ b/libinstaller/syslxcom.c @@ -123,9 +123,9 @@ void clear_attributes(int fd) { int flags; - if (!ioctl(fd, EXT2_IOC_GETFLAGS, &flags)) { - flags &= ~EXT2_IMMUTABLE_FL; - ioctl(fd, EXT2_IOC_SETFLAGS, &flags); + if (!ioctl(fd, FS_IOC_GETFLAGS, &flags)) { + flags &= ~FS_IMMUTABLE_FL; + ioctl(fd, FS_IOC_SETFLAGS, &flags); } break; } @@ -155,9 +155,9 @@ void set_attributes(int fd) { int flags; - if (st.st_uid == 0 && !ioctl(fd, EXT2_IOC_GETFLAGS, &flags)) { - flags |= EXT2_IMMUTABLE_FL; - ioctl(fd, EXT2_IOC_SETFLAGS, &flags); + if (st.st_uid == 0 && !ioctl(fd, FS_IOC_GETFLAGS, &flags)) { + flags |= FS_IMMUTABLE_FL; + ioctl(fd, FS_IOC_SETFLAGS, &flags); } break; } |