aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-11-28 08:23:44 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-11-28 08:23:44 +0000
commitb3b5ce889bfef7c4e9f1fbd9598d17b60d33a1b6 (patch)
treefe6dd0a3487802d48f202ea15197baa5a04eb808
parent09cf705b1e8ffdc339b2bd507dff112a012cb1e5 (diff)
parentb69fd3367d5693994a36729e88dcc4cbc9ee03db (diff)
downloadsquashfs-tools-b3b5ce889bfef7c4e9f1fbd9598d17b60d33a1b6.tar.gz
Snap for 4471243 from b69fd3367d5693994a36729e88dcc4cbc9ee03db to pi-release
Change-Id: I603ca0d8a03aacb2f3878e1e13ddd2f1a4115a70
-rw-r--r--squashfs-tools/android.c2
-rw-r--r--squashfs-tools/unsquashfs.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/squashfs-tools/android.c b/squashfs-tools/android.c
index 04c0ad9..a383d2b 100644
--- a/squashfs-tools/android.c
+++ b/squashfs-tools/android.c
@@ -108,7 +108,7 @@ struct vfs_cap_data set_caps(uint64_t capabilities) {
if (capabilities == 0)
return cap_data;
- cap_data.magic_etc = VFS_CAP_REVISION | VFS_CAP_FLAGS_EFFECTIVE;
+ cap_data.magic_etc = VFS_CAP_REVISION_2 | VFS_CAP_FLAGS_EFFECTIVE;
cap_data.data[0].permitted = (uint32_t) capabilities;
cap_data.data[0].inheritable = 0;
cap_data.data[1].permitted = (uint32_t) (capabilities >> 32);
diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
index 7f46968..0dbc4c2 100644
--- a/squashfs-tools/unsquashfs.c
+++ b/squashfs-tools/unsquashfs.c
@@ -826,8 +826,6 @@ int set_attributes(char *pathname, int mode, uid_t uid, gid_t guid, time_t time,
{
struct utimbuf times = { time, time };
- write_xattr(pathname, xattr);
-
if(utime(pathname, &times) == -1) {
ERROR("set_attributes: failed to set time on %s, because %s\n",
pathname, strerror(errno));
@@ -850,6 +848,8 @@ int set_attributes(char *pathname, int mode, uid_t uid, gid_t guid, time_t time,
return FALSE;
}
+ write_xattr(pathname, xattr);
+
return TRUE;
}