Lines Matching refs:args

100   args, remainder = parser.parse_known_args(argv)
105 args.file_contexts = remainder[0]
110 return args
113 def ConstructE2fsCommands(args): argument
128 if args.android_sparse:
132 if args.timestamp:
133 e2fsdroid_opts += ["-T", args.timestamp]
134 if args.fs_config:
135 e2fsdroid_opts += ["-C", args.fs_config]
136 if args.product_out:
137 e2fsdroid_opts += ["-p", args.product_out]
138 if args.block_list_file:
139 e2fsdroid_opts += ["-B", args.block_list_file]
140 if args.base_alloc_file_in:
141 e2fsdroid_opts += ["-d", args.base_alloc_file_in]
142 if args.base_alloc_file_out:
143 e2fsdroid_opts += ["-D", args.base_alloc_file_out]
144 if args.share_dup_blocks:
146 if args.file_contexts:
147 e2fsdroid_opts += ["-S", args.file_contexts]
149 if args.flash_erase_block_size:
151 int(args.flash_erase_block_size) / BLOCKSIZE))
152 if args.flash_logical_block_size:
154 stride = max(int(args.flash_logical_block_size), 8192)
156 if args.mke2fs_hash_seed:
157 mke2fs_extended_opts.append("hash_seed=" + args.mke2fs_hash_seed)
159 if args.journal_size:
160 if args.journal_size == "0":
163 mke2fs_opts += ["-J", "size=" + args.journal_size]
164 if args.label:
165 mke2fs_opts += ["-L", args.label]
166 if args.inodes:
167 mke2fs_opts += ["-N", args.inodes]
168 if args.inode_size:
169 mke2fs_opts += ["-I", args.inode_size]
170 if args.mount_point:
171 mke2fs_opts += ["-M", args.mount_point]
172 if args.reserved_percent:
173 mke2fs_opts += ["-m", args.reserved_percent]
174 if args.mke2fs_uuid:
175 mke2fs_opts += ["-U", args.mke2fs_uuid]
180 blocks = int(args.fs_size) / BLOCKSIZE
182 ["-t", args.ext_variant, "-b", str(BLOCKSIZE), args.output_file,
186 ["-f", args.src_dir, "-a", args.mount_point,
187 args.output_file])
197 args = ParseArguments(argv)
198 if not os.path.isdir(args.src_dir):
199 logging.error("Can not find directory %s", args.src_dir)
201 if not args.mount_point:
204 if args.mount_point[0] != '/':
205 args.mount_point = '/' + args.mount_point
206 if not args.fs_size:
210 mke2fs_cmd, e2fsdroid_cmd = ConstructE2fsCommands(args)
213 with open(args.output_file, 'w') as output:
223 if args.timestamp:
224 mke2fs_env["E2FSPROGS_FAKE_TIME"] = args.timestamp
234 if args.timestamp:
235 e2fsdroid_env["E2FSPROGS_FAKE_TIME"] = args.timestamp
243 os.remove(args.output_file)