diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2012-11-29 11:58:47 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2012-11-29 11:58:47 +0000 |
commit | 0846de0e1795a30512f5575388d163ea548125de (patch) | |
tree | e1bc03fa83c61165f48ffe3f528ac5496332872a /libinstaller/syslxcom.c | |
parent | ede8500d7c710e4ddf650f1a1ef3ccf2a89e5313 (diff) | |
parent | 7307d60063ee4303da4de45f9d984fdc8df92146 (diff) | |
download | syslinux-baserock/genivi/morph.tar.gz |
Merge the latest changes from upstreambaserock/genivi/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; } |