diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-06-23 02:30:24 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-06-23 02:30:24 +0000 |
commit | c2d3a2a979d6f94eb2503b6a89df63a2db27d1f9 (patch) | |
tree | e6840663b1693bf32ca1b2951480a8bdd00c1a8f | |
parent | c0c15ff7562525c04d7de3bdb14f2e96ca09ab36 (diff) | |
parent | 878e4ded1195061dc0a9b6f99db59a4ab86c7018 (diff) | |
download | e2fsprogs-android12-mainline-neuralnetworks-release.tar.gz |
Snap for 7483611 from 878e4ded1195061dc0a9b6f99db59a4ab86c7018 to mainline-neuralnetworks-releaseandroid-mainline-12.0.0_r92android-mainline-12.0.0_r78android-mainline-12.0.0_r50android-mainline-12.0.0_r33android-mainline-12.0.0_r3android12-mainline-neuralnetworks-release
Change-Id: I7cf79919fe3ca03fa5255a700589565a525d2fb9
-rw-r--r-- | Android.bp | 40 | ||||
-rw-r--r-- | METADATA | 3 | ||||
-rw-r--r-- | contrib/Android.bp | 10 | ||||
-rw-r--r-- | contrib/android/Android.bp | 9 | ||||
-rw-r--r-- | contrib/android/e2fsdroid.c | 5 | ||||
-rw-r--r-- | contrib/android/perms.h | 1 | ||||
-rw-r--r-- | debugfs/Android.bp | 10 | ||||
-rw-r--r-- | e2fsck/Android.bp | 13 | ||||
-rw-r--r-- | lib/Android.bp | 23 | ||||
-rw-r--r-- | lib/blkid/Android.bp | 13 | ||||
-rw-r--r-- | lib/e2p/Android.bp | 11 | ||||
-rw-r--r-- | lib/et/Android.bp | 13 | ||||
-rw-r--r-- | lib/ext2fs/Android.bp | 15 | ||||
-rw-r--r-- | lib/ss/Android.bp | 10 | ||||
-rw-r--r-- | lib/support/Android.bp | 11 | ||||
-rw-r--r-- | lib/uuid/Android.bp | 23 | ||||
-rw-r--r-- | misc/Android.bp | 13 | ||||
-rw-r--r-- | misc/tune2fs.8.in | 23 | ||||
-rw-r--r-- | misc/tune2fs.c | 4 | ||||
-rw-r--r-- | resize/Android.bp | 10 |
20 files changed, 243 insertions, 17 deletions
@@ -1,5 +1,45 @@ // Copyright 2017 The Android Open Source Project +package { + default_applicable_licenses: ["external_e2fsprogs_license"], +} + +// Added automatically by a large-scale-change that took the approach of +// 'apply every license found to every target'. While this makes sure we respect +// every license restriction, it may not be entirely correct. +// +// e.g. GPL in an MIT project might only apply to the contrib/ directory. +// +// Please consider splitting the single license below into multiple licenses, +// taking care not to lose any license_kind information, and overriding the +// default license using the 'licenses: [...]' property on targets as needed. +// +// For unused files, consider creating a 'fileGroup' with "//visibility:private" +// to attach the license to, and including a comment whether the files may be +// used in the current project. +// See: http://go/android-license-faq +license { + name: "external_e2fsprogs_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-0BSD", + "SPDX-license-identifier-Apache-2.0", + "SPDX-license-identifier-BSD", + "SPDX-license-identifier-GPL", + "SPDX-license-identifier-GPL-2.0", + "SPDX-license-identifier-LGPL", + "SPDX-license-identifier-LGPL-2.0", + "SPDX-license-identifier-LGPL-2.1", + "SPDX-license-identifier-LGPL-3.0", + "SPDX-license-identifier-MIT", + "legacy_notice", + "legacy_unencumbered", + ], + license_text: [ + "NOTICE", + ], +} + cc_defaults { name: "e2fsprogs-defaults", cflags: ["-Wall", "-Werror"], diff --git a/METADATA b/METADATA new file mode 100644 index 00000000..6d8601bb --- /dev/null +++ b/METADATA @@ -0,0 +1,3 @@ +third_party { + license_type: RESTRICTED +} diff --git a/contrib/Android.bp b/contrib/Android.bp index 8bde657f..5fb5545b 100644 --- a/contrib/Android.bp +++ b/contrib/Android.bp @@ -1,5 +1,15 @@ // Copyright 2017 The Android Open Source Project +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + // SPDX-license-identifier-GPL + default_applicable_licenses: ["external_e2fsprogs_license"], +} + subdirs = ["android"] //######################################################################## diff --git a/contrib/android/Android.bp b/contrib/android/Android.bp index b1fd0daa..c33ebf49 100644 --- a/contrib/android/Android.bp +++ b/contrib/android/Android.bp @@ -3,6 +3,15 @@ //########################################################################## // Build e2fsdroid +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_binary { name: "e2fsdroid", host_supported: true, diff --git a/contrib/android/e2fsdroid.c b/contrib/android/e2fsdroid.c index 1beb1e25..f5d24b88 100644 --- a/contrib/android/e2fsdroid.c +++ b/contrib/android/e2fsdroid.c @@ -76,11 +76,12 @@ static int parse_ugid_map_entry(char* line, struct ugid_map_entry* result) token && num_tokens < 3; token = strtok_r(NULL, " ", &token_saveptr), ++num_tokens) { char* endptr = NULL; - *parsed[num_tokens] = strtoul(token, &endptr, 10); - if ((*parsed[num_tokens] == ULONG_MAX && errno) || *endptr) { + unsigned long t = strtoul(token, &endptr, 10); + if ((t == ULONG_MAX && errno) || (t > UINT_MAX) || *endptr) { fprintf(stderr, "Malformed u/gid mapping line\n"); return 0; } + *parsed[num_tokens] = (unsigned int) t; } if (num_tokens < 3 || strtok_r(NULL, " ", &token_saveptr) != NULL) { fprintf(stderr, "Malformed u/gid mapping line\n"); diff --git a/contrib/android/perms.h b/contrib/android/perms.h index 6d6a2129..79871272 100644 --- a/contrib/android/perms.h +++ b/contrib/android/perms.h @@ -51,6 +51,7 @@ static inline errcode_t android_configure_fs(ext2_filsys fs, # endif # include <private/android_filesystem_config.h> # include <private/canned_fs_config.h> +# include <private/fs_config.h> errcode_t android_configure_fs(ext2_filsys fs, char *src_dir, char *target_out, diff --git a/debugfs/Android.bp b/debugfs/Android.bp index b9f299b5..dd146e4c 100644 --- a/debugfs/Android.bp +++ b/debugfs/Android.bp @@ -3,6 +3,16 @@ //######################## // Build the debugfs binary +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-GPL + // SPDX-license-identifier-GPL-2.0 + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_defaults { name: "debugfs-defaults", defaults: ["e2fsprogs-defaults"], diff --git a/e2fsck/Android.bp b/e2fsck/Android.bp index d4326e53..166d7657 100644 --- a/e2fsck/Android.bp +++ b/e2fsck/Android.bp @@ -3,6 +3,17 @@ //######################## // Build the e2fsck binary +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-GPL + // SPDX-license-identifier-GPL-2.0 + // SPDX-license-identifier-LGPL + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_defaults { name: "e2fsck-defaults", defaults: ["e2fsprogs-defaults"], @@ -53,10 +64,12 @@ e2fsck_libs = [ cc_binary { name: "e2fsck", host_supported: true, + vendor_ramdisk_available: true, defaults: ["e2fsck-defaults"], shared_libs: e2fsck_libs, system_shared_libs: ["libc", "libdl"], + required: ["badblocks"], } cc_binary { diff --git a/lib/Android.bp b/lib/Android.bp index d877475a..fb0ea07e 100644 --- a/lib/Android.bp +++ b/lib/Android.bp @@ -3,11 +3,30 @@ // All the libraries under this directory export their headers as relative // paths to this directory (external/e2fsprogs/lib). This is a helper headers // only library to allow exporting +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-0BSD + // SPDX-license-identifier-BSD + // SPDX-license-identifier-GPL + // SPDX-license-identifier-GPL-2.0 + // SPDX-license-identifier-LGPL + // SPDX-license-identifier-LGPL-2.1 + // SPDX-license-identifier-LGPL-3.0 + // SPDX-license-identifier-MIT + // legacy_unencumbered + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_library_headers { name: "libext2-headers", host_supported: true, vendor_available: true, + product_available: true, ramdisk_available: true, + vendor_ramdisk_available: true, recovery_available: true, target: { windows: { @@ -15,6 +34,10 @@ cc_library_headers { }, }, export_include_dirs: ["."], + apex_available: [ + "//apex_available:platform", + "com.android.virt", + ], } diff --git a/lib/blkid/Android.bp b/lib/blkid/Android.bp index ccfdf8b9..9e0e2914 100644 --- a/lib/blkid/Android.bp +++ b/lib/blkid/Android.bp @@ -1,9 +1,22 @@ // Copyright 2017 The Android Open Source Project +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-GPL + // SPDX-license-identifier-LGPL + // SPDX-license-identifier-LGPL-2.1 + // SPDX-license-identifier-LGPL-3.0 + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_library { name: "libext2_blkid", host_supported: true, ramdisk_available: true, + vendor_ramdisk_available: true, recovery_available: true, unique_host_soname: true, defaults: ["e2fsprogs-defaults"], diff --git a/lib/e2p/Android.bp b/lib/e2p/Android.bp index aa09ad06..566afd2f 100644 --- a/lib/e2p/Android.bp +++ b/lib/e2p/Android.bp @@ -1,9 +1,20 @@ // Copyright 2017 The Android Open Source Project +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-GPL + // SPDX-license-identifier-LGPL + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_library { name: "libext2_e2p", host_supported: true, ramdisk_available: true, + vendor_ramdisk_available: true, recovery_available: true, unique_host_soname: true, defaults: ["e2fsprogs-defaults"], diff --git a/lib/et/Android.bp b/lib/et/Android.bp index 7df5bf60..07f3c277 100644 --- a/lib/et/Android.bp +++ b/lib/et/Android.bp @@ -1,9 +1,22 @@ // Copyright 2017 The Android Open Source Project +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-0BSD + // SPDX-license-identifier-BSD + // SPDX-license-identifier-GPL-2.0 + // SPDX-license-identifier-MIT + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_library { name: "libext2_com_err", host_supported: true, ramdisk_available: true, + vendor_ramdisk_available: true, recovery_available: true, unique_host_soname: true, defaults: ["e2fsprogs-defaults"], diff --git a/lib/ext2fs/Android.bp b/lib/ext2fs/Android.bp index 8a46c025..919adb13 100644 --- a/lib/ext2fs/Android.bp +++ b/lib/ext2fs/Android.bp @@ -1,9 +1,24 @@ // Copyright 2017 The Android Open Source Project +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-GPL + // SPDX-license-identifier-GPL-2.0 + // SPDX-license-identifier-LGPL + // SPDX-license-identifier-LGPL-2.1 + // SPDX-license-identifier-LGPL-3.0 + // legacy_unencumbered + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_library { name: "libext2fs", host_supported: true, ramdisk_available: true, + vendor_ramdisk_available: true, recovery_available: true, unique_host_soname: true, defaults: ["e2fsprogs-defaults"], diff --git a/lib/ss/Android.bp b/lib/ss/Android.bp index 09332512..ebc1e1af 100644 --- a/lib/ss/Android.bp +++ b/lib/ss/Android.bp @@ -1,5 +1,15 @@ // Copyright 2017 The Android Open Source Project +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-0BSD + // SPDX-license-identifier-MIT + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_library { name: "libext2_ss", host_supported: true, diff --git a/lib/support/Android.bp b/lib/support/Android.bp index 14f2f239..a0b064dd 100644 --- a/lib/support/Android.bp +++ b/lib/support/Android.bp @@ -1,9 +1,20 @@ // Copyright 2017 The Android Open Source Project +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-GPL + // SPDX-license-identifier-MIT + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_library { name: "libext2_quota", host_supported: true, ramdisk_available: true, + vendor_ramdisk_available: true, recovery_available: true, unique_host_soname: true, defaults: ["e2fsprogs-defaults"], diff --git a/lib/uuid/Android.bp b/lib/uuid/Android.bp index 37b44673..67968dba 100644 --- a/lib/uuid/Android.bp +++ b/lib/uuid/Android.bp @@ -1,11 +1,30 @@ // Copyright 2017 The Android Open Source Project +package { + default_applicable_licenses: ["external_e2fsprogs_lib_uuid_license"], +} + +// Added automatically by a large-scale-change +// See: http://go/android-license-faq +license { + name: "external_e2fsprogs_lib_uuid_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-BSD", + ], + license_text: [ + "COPYING", + ], +} + cc_library { name: "libext2_uuid", host_supported: true, ramdisk_available: true, + vendor_ramdisk_available: true, recovery_available: true, vendor_available: true, + product_available: true, unique_host_soname: true, defaults: ["e2fsprogs-defaults"], srcs: [ @@ -35,4 +54,8 @@ cc_library { header_libs: ["libext2-headers"], export_include_dirs: ["."], export_header_lib_headers: ["libext2-headers"], + apex_available: [ + "//apex_available:platform", + "com.android.virt", + ], } diff --git a/misc/Android.bp b/misc/Android.bp index a93bea4d..ca4267b8 100644 --- a/misc/Android.bp +++ b/misc/Android.bp @@ -2,6 +2,18 @@ // Library used to export files from this directory to other programs in this // project. +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-GPL + // SPDX-license-identifier-LGPL + // SPDX-license-identifier-LGPL-2.1 + // SPDX-license-identifier-LGPL-3.0 + default_applicable_licenses: ["external_e2fsprogs_license"], +} + cc_library { name: "libext2_misc", host_supported: true, @@ -129,6 +141,7 @@ tune2fs_libs = [ cc_binary { name: "tune2fs", host_supported: true, + vendor_ramdisk_available: true, defaults: ["tune2fs-defaults"], shared_libs: tune2fs_libs, diff --git a/misc/tune2fs.8.in b/misc/tune2fs.8.in index 8b3604f4..94b6c8ee 100644 --- a/misc/tune2fs.8.in +++ b/misc/tune2fs.8.in @@ -229,21 +229,18 @@ is not specified, utf8 is used. The encoding cannot be altered if casefold was previously enabled. .TP .BI encoding_flags= encoding-flags -Override the flags for filename encoding. This option may only be specified -when -.I encoding-name -is also specified and when the file system doesn't already have the -.I casefold -feature enabled. Currently the only recognized flag is -.I strict -which means that invalid filenames are rejected by the file system. By default, +Define parameters for file name character encoding operations. If a +flag is not changed using this parameter, its default value is used. +.I encoding-flags +should be a comma-separated lists of flags to be enabled. The flags cannot be +altered if casefold was previously enabled. + +The only flag that can be set right now is .I strict -is not enabled. -Flags may be prefixed with "no" to explicitly leave them disabled, e.g. -.I nostrict -to explicitly leave the +which means that invalid strings should be rejected by the file system. +In the default configuration, the .I strict -flag disabled. +flag is disabled. .TP .BI mount_opts= mount_option_string Set a set of default mount options which will be used when the file diff --git a/misc/tune2fs.c b/misc/tune2fs.c index b01497cb..b721696f 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -101,7 +101,7 @@ static int rewrite_checksums; static int feature_64bit; static int fsck_requested; static char *undo_file; -static int enabling_casefold; +int enabling_casefold; int journal_size, journal_flags; char *journal_device; @@ -2029,7 +2029,7 @@ static int parse_extended_opts(ext2_filsys fs, const char *opts) char *buf, *token, *next, *p, *arg; int len, hash_alg; int r_usage = 0; - int encoding = 0; + int encoding = 0; char *encoding_flags = NULL; len = strlen(opts); diff --git a/resize/Android.bp b/resize/Android.bp index 8acdcf62..fe72824c 100644 --- a/resize/Android.bp +++ b/resize/Android.bp @@ -1,5 +1,14 @@ // Copyright 2017 The Android Open Source Project +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_e2fsprogs_license" + // to get the below license kinds: + // SPDX-license-identifier-GPL + default_applicable_licenses: ["external_e2fsprogs_license"], +} + resize2fs_libs = [ "libext2fs", "libext2_com_err", @@ -24,6 +33,7 @@ cc_defaults { cc_binary { name: "resize2fs", host_supported: true, + vendor_ramdisk_available: true, defaults: ["resize2fs-defaults"], // Host binaries can be compiled statically to be re-used in other environments. |