diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-12-22 11:51:38 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-12-22 11:51:38 +0000 |
commit | 8821237240c5374d83298b2da5ad88fa1e3c1ef7 (patch) | |
tree | e1bc03fa83c61165f48ffe3f528ac5496332872a /libinstaller/syslxcom.c | |
parent | 38dcca25c8855c95649e3f0b5b09fae862ed5c7a (diff) | |
parent | 7307d60063ee4303da4de45f9d984fdc8df92146 (diff) | |
download | syslinux-8821237240c5374d83298b2da5ad88fa1e3c1ef7.tar.gz |
Merge remote-tracking branch 'remotes/upstream/master' into baserock/morph
Diffstat (limited to 'libinstaller/syslxcom.c')
-rw-r--r-- | libinstaller/syslxcom.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libinstaller/syslxcom.c b/libinstaller/syslxcom.c index 1de85aa5..57f13cda 100644 --- a/libinstaller/syslxcom.c +++ b/libinstaller/syslxcom.c @@ -30,8 +30,10 @@ #include <sys/types.h> #include <sys/mount.h> #include <sys/vfs.h> + #include "linuxioctl.h" #include "syslxcom.h" +#include "syslxfs.h" const char *program; @@ -121,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; } @@ -133,6 +135,8 @@ void clear_attributes(int fd) ioctl(fd, FAT_IOCTL_SET_ATTRIBUTES, &attr); break; } + case NTFS: + break; default: break; } @@ -151,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; } @@ -163,6 +167,8 @@ void set_attributes(int fd) ioctl(fd, FAT_IOCTL_SET_ATTRIBUTES, &attr); break; } + case NTFS: + break; default: break; } |