| /third_party/toybox/toys/other/ |
| H A D | losetup.c | 15 Associate a loopback device with a file, or show current file (if any) 24 -c Check capacity (file size changed) 52 static int loopback_setup(char *device, char *file) in loopback_setup() argument 58 // Open file (ffd) and loop device (lfd) in loopback_setup() 60 if (file) ffd = xopen(file, TT.openflags); in loopback_setup() 83 if (errno == ENXIO && FLAG(f) && !file) { in loopback_setup() 87 if (errno != ENXIO || !file) { in loopback_setup() 97 // Check size of file o in loopback_setup() 187 char *file = (FLAG(c) || FLAG(d)) ? NULL : toys.optargs[1]; losetup_main() local [all...] |
| /third_party/python/Tools/freeze/ |
| H A D | bkfile.py | 3 def open(file, mode='r', bufsize=-1): 5 return _orig_open(file, mode, bufsize) 7 backup = file + '~' 13 os.rename(file, backup) 15 return _orig_open(file, mode, bufsize) 16 f = _orig_open(file, mode, bufsize) 21 if filecmp.cmp(backup, file, shallow=False): 23 os.unlink(file) 24 os.rename(backup, file)
|
| /third_party/ltp/lib/ |
| H A D | tst_safe_file_at.c | 35 int safe_openat(const char *const file, const int lineno, in safe_openat() argument 53 tst_brk_(file, lineno, TBROK | TERRNO, in safe_openat() 60 ssize_t safe_file_readat(const char *const file, const int lineno, in safe_file_readat() argument 64 int fd = safe_openat(file, lineno, dirfd, path, O_RDONLY); in safe_file_readat() 70 rval = safe_read(file, lineno, NULL, 0, fd, buf, nbyte - 1); in safe_file_readat() 78 tst_brk_(file, lineno, TBROK, in safe_file_readat() 120 int safe_file_vprintfat(const char *const file, const int lineno, in safe_file_vprintfat() argument 143 tst_brk_(file, lineno, TBROK | TERRNO, in safe_file_vprintfat() 152 tst_brk_(file, lineno, TBROK | TERRNO, in safe_file_vprintfat() 160 int safe_file_printfat(const char *const file, cons argument 174 safe_unlinkat(const char *const file, const int lineno, const int dirfd, const char *const path, const int flags) safe_unlinkat() argument 202 safe_fchownat(const char *const file, const int lineno, const int dirfd, const char *const path, uid_t owner, gid_t group, int flags) safe_fchownat() argument 222 safe_fstatat(const char *const file, const int lineno, const int dirfd, const char *const path, struct stat *statbuf, int flags) safe_fstatat() argument [all...] |
| H A D | safe_stdio.c | 26 FILE *safe_fopen(const char *file, const int lineno, void (cleanup_fn)(void), in safe_fopen() argument 32 tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn, in safe_fopen() 39 int safe_fclose(const char *file, const int lineno, void (cleanup_fn)(void), in safe_fclose() argument 47 tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn, in safe_fclose() 50 tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn, in safe_fclose() 57 int safe_asprintf(const char *file, const int lineno, void (cleanup_fn)(void), in safe_asprintf() argument 68 tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn, in safe_asprintf() 71 tst_brkm_(file, lineno, TBROK | TERRNO, cleanup_fn, in safe_asprintf() 78 FILE *safe_popen(const char *file, const int lineno, void (cleanup_fn)(void), in safe_popen() argument 89 tst_brkm_(file, linen in safe_popen() [all...] |
| H A D | tst_safe_io_uring.c | 10 int safe_io_uring_init(const char *file, const int lineno, in safe_io_uring_init() argument 21 tst_brk_(file, lineno, TBROK | TERRNO, in safe_io_uring_init() 25 tst_brk_(file, lineno, TBROK | TERRNO, in safe_io_uring_init() 38 uring->sqr_base = safe_mmap(file, lineno, NULL, uring->sqr_mapsize, in safe_io_uring_init() 45 uring->sqr_entries = safe_mmap(file, lineno, NULL, in safe_io_uring_init() 53 uring->cqr_base = safe_mmap(file, lineno, NULL, uring->cqr_mapsize, in safe_io_uring_init() 75 int safe_io_uring_close(const char *file, const int lineno, in safe_io_uring_close() argument 80 safe_munmap(file, lineno, NULL, uring->cqr_base, uring->cqr_mapsize); in safe_io_uring_close() 81 safe_munmap(file, lineno, NULL, uring->sqr_entries, in safe_io_uring_close() 83 safe_munmap(file, linen in safe_io_uring_close() 89 safe_io_uring_enter(const char *file, const int lineno, int strict, int fd, unsigned int to_submit, unsigned int min_complete, unsigned int flags, sigset_t *sig) safe_io_uring_enter() argument [all...] |
| /third_party/protobuf/src/google/protobuf/compiler/cpp/ |
| H A D | cpp_helpers.h | 94 bool IsBootstrapProto(const Options& options, const FileDescriptor* file); 96 // Name space of the proto file. This namespace is such that the string 163 std::string DescriptorTableName(const FileDescriptor* file, 166 // When declaring symbol externs from another file, this macro will supply the 167 // dllexport needed for the target file, if any. 168 std::string FileDllExport(const FileDescriptor* file, const Options& options); 232 // Convert a file name into a valid identifier. 235 // For each .proto file generates a unique name. To prevent collisions of 245 return UniqueName(name, d->file(), options); in UniqueName() 249 return UniqueName(name, d->file(), option in UniqueName() 308 UseUnknownFieldSet(const FileDescriptor* file, const Options& options) UseUnknownFieldSet() argument 381 HasGeneratedMethods(const FileDescriptor* file, const Options& options) HasGeneratedMethods() argument 387 HasDescriptorMethods(const FileDescriptor* file, const Options& options) HasDescriptorMethods() argument 393 HasGenericServices(const FileDescriptor* file, const Options& options) HasGenericServices() argument 409 IsProto2MessageSetFile(const FileDescriptor* file, const Options& options) IsProto2MessageSetFile() argument 427 HasFieldPresence(const FileDescriptor* file) HasFieldPresence() argument 453 SupportsArenas(const FileDescriptor* file) SupportsArenas() argument 484 IncludeGuard(const FileDescriptor* file, bool pb_h, const Options& options) IncludeGuard() argument 515 GetOptimizeFor(const FileDescriptor* file, const Options& options) GetOptimizeFor() argument 519 NeedsEagerDescriptorAssignment(const FileDescriptor* file, const Options& options) NeedsEagerDescriptorAssignment() argument 540 FlattenMessagesInFile( const FileDescriptor* file) FlattenMessagesInFile() argument [all...] |
| /third_party/libsnd/tests/ |
| H A D | fix_this.c | 77 { SNDFILE *file ; in lcomp_test_int() local 106 if (! (file = sf_open (filename, SFM_WRITE, &sfinfo))) in lcomp_test_int() 112 if ((k = sf_writef_int (file, orig, datalen)) != datalen) in lcomp_test_int() 116 sf_close (file) ; in lcomp_test_int() 123 if (! (file = sf_open (filename, SFM_READ, &sfinfo))) in lcomp_test_int() 135 { printf ("Too few.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ; in lcomp_test_int() 140 { printf ("Too many.frames in file. (%" PRId64 " should be a little more than %" PRId64 ")\n", datalen, sfinfo.frames) ; in lcomp_test_int() 145 { printf ("Incorrect number of channels in file.\n") ; in lcomp_test_int() 149 check_log_buffer_or_die (file, __LINE__) ; in lcomp_test_int() 151 if ((k = sf_readf_int (file, dat in lcomp_test_int() [all...] |
| /test/xts/acts/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/entry/src/ohosTest/js/test/ |
| H A D | KvStoreBackupCallbackJsTest.js | 4 * you may not use this file except in compliance with the License.
105 function publicBackup(kvStore,file){
106 console.log(`Test backup ${JSON.stringify(file)}`)
108 kvStore.backup(file, function(err, data){
144 function publicRestoreSp(kvStore,file){
145 console.log(`Test restoresp ${JSON.stringify(file)}`)
147 kvStore.restore(file, function(err, data){
184 let file = '';
185 let files =new Array(file);
255 file [all...] |
| H A D | KvStoreBackupPromiseJsTest.js | 4 * you may not use this file except in compliance with the License.
102 function publicBackup(kvStore,file){
103 console.log(`Test backup ${JSON.stringify(file)}`)
105 kvStore.backup(file).then((data) => {
137 function publicRestoreSp(kvStore,file){
138 console.log(`Test restoresp ${JSON.stringify(file)}`)
140 kvStore.restore(file).then((data) => {
176 let file = '';
177 let files =new Array(file);
244 file [all...] |
| /device/soc/rockchip/common/kernel/drivers/gpu/arm/bifrost/ |
| H A D | mali_kbase_dvfs_debugfs.c | 31 * @file: The seq_file for printing to 36 static int kbasep_dvfs_utilization_debugfs_show(struct seq_file *file, void *data) in kbasep_dvfs_utilization_debugfs_show() argument 38 struct kbase_device *kbdev = file->private; in kbasep_dvfs_utilization_debugfs_show() 41 seq_printf(file, "busy_time: %u idle_time: %u protm_time: %u\n", in kbasep_dvfs_utilization_debugfs_show() 46 seq_printf(file, "busy_time: %u idle_time: %u\n", in kbasep_dvfs_utilization_debugfs_show() 55 struct file *file) in kbasep_dvfs_utilization_debugfs_open() 57 return single_open(file, kbasep_dvfs_utilization_debugfs_show, in kbasep_dvfs_utilization_debugfs_open() 70 struct dentry *file; in kbase_dvfs_status_debugfs_init() local 80 file in kbase_dvfs_status_debugfs_init() 54 kbasep_dvfs_utilization_debugfs_open(struct inode *in, struct file *file) kbasep_dvfs_utilization_debugfs_open() argument [all...] |
| /third_party/node/deps/openssl/openssl/external/perl/Text-Template-1.56/t/ |
| H A D | taint.t | 21 my $file = $tmpfile->filename; 32 open my $fh, '>', $file or die "Couldn't write temporary file $file: $!"; 34 close $fh or die "Couldn't finish temporary file $file: $!"; 72 my $tfile = $file; 75 should_be_clean($file); 76 should_fail TYPE => 'file', SOURCE => $tfile; 77 should_fail TYPE => 'file', SOURC [all...] |
| /third_party/openssl/external/perl/Text-Template-1.56/t/ |
| H A D | taint.t | 21 my $file = $tmpfile->filename; 32 open my $fh, '>', $file or die "Couldn't write temporary file $file: $!"; 34 close $fh or die "Couldn't finish temporary file $file: $!"; 72 my $tfile = $file; 75 should_be_clean($file); 76 should_fail TYPE => 'file', SOURCE => $tfile; 77 should_fail TYPE => 'file', SOURC [all...] |
| /third_party/rust/crates/rustix/tests/io/ |
| H A D | seals.rs | 15 let mut file = File::from(fd); in test_seals() variables 17 let old = fcntl_get_seals(&file).unwrap(); in test_seals() 20 writeln!(&mut file, "Hello!").unwrap(); in test_seals() 22 fcntl_add_seals(&file, SealFlags::GROW).unwrap(); in test_seals() 24 let now = fcntl_get_seals(&file).unwrap(); in test_seals() 28 writeln!(&mut file, "World?").unwrap_err(); in test_seals() 31 ftruncate(&mut file, 1).unwrap(); in test_seals() 33 fcntl_add_seals(&file, SealFlags::SHRINK).unwrap(); in test_seals() 35 let now = fcntl_get_seals(&file).unwrap(); in test_seals() 39 ftruncate(&mut file, in test_seals() [all...] |
| /third_party/fsverity-utils/programs/ |
| H A D | cmd_enable.c | 8 * license that can be found in the LICENSE file or at 21 struct filedes file = { .fd = -1 }; in read_signature() local 26 if (!open_file(&file, filename, O_RDONLY, 0)) in read_signature() 28 if (!get_file_size(&file, &file_size)) in read_signature() 31 error_msg("signature file '%s' is empty", filename); in read_signature() 35 error_msg("signature file '%s' is too large", filename); in read_signature() 39 if (!full_read(&file, sig, file_size)) in read_signature() 46 filedes_close(&file); in read_signature() 59 /* Enable fs-verity on a file. */ 66 struct filedes file; in fsverity_cmd_enable() local [all...] |
| /third_party/ltp/libs/libltpnewipc/ |
| H A D | libnewipc.c | 29 key_t getipckey(const char *file, const int lineno) in getipckey() argument 36 safe_getcwd(file, lineno, NULL, buf, BUFSIZE); in getipckey() 44 "ftok() failed at %s:%d", file, lineno); in getipckey() 50 int get_used_sysvipc(const char *file, const int lineno, const char *sysvipc_file) in get_used_sysvipc() argument 56 fp = safe_fopen(file, lineno, NULL, sysvipc_file, "r"); in get_used_sysvipc() 65 "%s:%d", sysvipc_file, file, lineno); in get_used_sysvipc() 71 void *probe_free_addr(const char *file, const int lineno) in probe_free_addr() argument 79 shm_id = safe_shmget(file, lineno, probe_key, SHMLBA * 2, in probe_free_addr() 81 addr = safe_shmat(file, lineno, shm_id, NULL, 0); in probe_free_addr() 82 safe_shmdt(file, linen in probe_free_addr() [all...] |
| /third_party/skia/third_party/externals/microhttpd/src/examples/ |
| H A D | fileserver_example.c | 2 This file is part of libmicrohttpd 21 * @file fileserver_example.c 35 FILE *file = cls; in file_reader() local 37 (void) fseek (file, pos, SEEK_SET); in file_reader() 38 return fread (buf, 1, max, file); in file_reader() 44 FILE *file = cls; in free_callback() local 45 fclose (file); in free_callback() 60 FILE *file; in ahc_echo() local 73 file = fopen (&url[1], "rb"); in ahc_echo() 75 file in ahc_echo() [all...] |
| H A D | https_fileserver_example.c | 2 This file is part of libmicrohttpd 20 * @file https_fileserver_example.c 21 * @brief a simple HTTPS file server using TLS. 101 FILE *file = cls; in file_reader() local 103 (void) fseek (file, pos, SEEK_SET); in file_reader() 104 return fread (buf, 1, max, file); in file_reader() 110 FILE *file = cls; in file_free_callback() local 111 fclose (file); in file_free_callback() 127 FILE *file; in http_ahc() local 142 file in http_ahc() [all...] |
| /third_party/vk-gl-cts/scripts/src_util/ |
| H A D | check_boms.py | 10 # you may not use this file except in compliance with the License. 32 def hasBOM (file): 33 with open(file, 'rb') as f: 39 def removeBOM (file): 40 with open(file, 'r+b') as f: 62 for file in files: 63 yield os.path.join(root, file) 67 for file in files: 68 if hasBOM(file): 70 removeBOM(file) [all...] |
| /third_party/gn/src/gn/ |
| H A D | input_file_manager.cc | 3 // found in the LICENSE file. 41 InputFile* file, in DoLoadFile() 45 // Do all of this stuff outside the lock. We should not give out file in DoLoadFile() 49 if (origin.begin().file()) in DoLoadFile() 58 if (!load_file_callback(name, file)) { in DoLoadFile() 59 *err = Err(origin, "Can't load input file.", in DoLoadFile() 63 } else if (!file->Load(primary_path)) { in DoLoadFile() 68 if (!file->Load(secondary_path)) { in DoLoadFile() 69 *err = Err(origin, "Can't load input file.", in DoLoadFile() 87 *tokens = Tokenizer::Tokenize(file, er in DoLoadFile() 37 DoLoadFile(const LocationRange& origin, const BuildSettings* build_settings, const SourceFile& name, InputFileManager::SyncLoadFileCallback load_file_callback, InputFile* file, std::vector<Token>* tokens, std::unique_ptr<ParseNode>* root, Err* err) DoLoadFile() argument 247 AddDynamicInput( const SourceFile& name, InputFile** file, std::vector<Token>** tokens, std::unique_ptr<ParseNode>** parse_root) AddDynamicInput() argument 277 BackgroundLoadFile(const LocationRange& origin, const BuildSettings* build_settings, const SourceFile& name, InputFile* file) BackgroundLoadFile() argument 286 LoadFile(const LocationRange& origin, const BuildSettings* build_settings, const SourceFile& name, InputFile* file, Err* err) LoadFile() argument [all...] |
| /third_party/lwip/src/apps/http/makefsdata/ |
| H A D | tinydir.h | 228 int tinydir_readfile(const tinydir_dir *dir, tinydir_file *file); 230 int tinydir_readfile_n(const tinydir_dir *dir, tinydir_file *file, size_t i); 235 int tinydir_file_open(tinydir_file *file, const _tinydir_char_t *path); 237 void _tinydir_get_ext(tinydir_file *file); 313 /* read first file */ in tinydir_open() 485 int tinydir_readfile(const tinydir_dir *dir, tinydir_file *file) in tinydir_open() argument 487 if (dir == NULL || file == NULL) in tinydir_open() 511 /* the path for the file will be too long */ in tinydir_open() 527 _tinydir_strcpy(file->path, dir->path); in tinydir_open() 528 _tinydir_strcat(file in tinydir_open() [all...] |
| /third_party/protobuf/src/google/protobuf/compiler/objectivec/ |
| H A D | objectivec_file.cc | 87 // Checks if the file contains any enum definitions (at the root or 89 bool FileContainsEnums(const FileDescriptor* file) { in FileContainsEnums() argument 90 if (file->enum_type_count() > 0) { in FileContainsEnums() 93 for (int i = 0; i < file->message_type_count(); i++) { in FileContainsEnums() 94 if (MessageContainsEnums(file->message_type(i))) { in FileContainsEnums() 101 // Checks if the file contains any extensions definitions (at the root or 103 bool FileContainsExtensions(const FileDescriptor* file) { in FileContainsExtensions() argument 104 if (file->extension_count() > 0) { in FileContainsExtensions() 107 for (int i = 0; i < file->message_type_count(); i++) { in FileContainsExtensions() 108 if (MessageContainsExtensions(file in FileContainsExtensions() 117 PruneFileAndDepsMarkingAsVisited( const FileDescriptor* file, std::vector<const FileDescriptor*>* files, std::set<const FileDescriptor*>* files_visited) PruneFileAndDepsMarkingAsVisited() argument 133 CollectMinimalFileDepsContainingExtensionsWorker( const FileDescriptor* file, std::vector<const FileDescriptor*>* files, std::set<const FileDescriptor*>* files_visited) CollectMinimalFileDepsContainingExtensionsWorker() argument 166 CollectMinimalFileDepsContainingExtensions( const FileDescriptor* file, std::vector<const FileDescriptor*>* files) CollectMinimalFileDepsContainingExtensions() argument 177 IsDirectDependency(const FileDescriptor* dep, const FileDescriptor* file) IsDirectDependency() argument 188 FileGenerator(const FileDescriptor *file, const Options& options) FileGenerator() argument [all...] |
| /third_party/ltp/include/ |
| H A D | safe_file_ops_fn.h | 37 * All-in-one function to scanf value(s) from a file. 39 int file_scanf(const char *file, const int lineno, 43 void safe_file_scanf(const char *file, const int lineno, 48 int file_lines_scanf(const char *file, const int lineno, 54 * All-in-one function that lets you printf directly into a file. 56 int file_printf(const char *file, const int lineno, 60 void safe_file_printf(const char *file, const int lineno, 65 void safe_try_file_printf(const char *file, const int lineno, 72 int safe_cp(const char *file, const int lineno, 77 * Safe function to touch a file [all...] |
| /third_party/vk-gl-cts/external/vulkan-docs/src/scripts/ |
| H A D | genRef.py | 78 """Print Khronos CC-BY copyright notice on open file fp. 81 file.""" 82 print('// Copyright 2014-2024 The Khronos Group Inc.', file=fp) 83 print('//', file=fp) 85 print('// SPDX' + '-License-Identifier: CC-BY-4.0', file=fp) 86 print('', file=fp) 90 """Print footer material at the end of each refpage on open file fp. 112 sep='\n', file=fp) 206 # Relative path to include file from here 227 - fp - file t [all...] |
| /third_party/ntfs-3g/ntfsprogs/ |
| H A D | ntfsundelete.c | 24 * distribution in the file COPYING); if not, write to the Free Software 119 static short avoid_duplicate_printing; /* Flag No duplicate printing of file infos */ 423 " -T, --truncate Truncate 100%% recoverable file to exact size.\n" in usage() 426 " -c, --copy RANGE Write a range of MFT records to a file\n" in usage() 894 * free_file - Release the resources used by a file object 895 * @file: The unwanted file object 897 * This will free up the memory used by a file object and iterate through the 902 static void free_file(struct ufile *file) in free_file() argument 906 if (!file) in free_file() 1147 get_filenames(struct ufile *file, ntfs_volume* vol) get_filenames() argument 1262 get_data(struct ufile *file, ntfs_volume *vol) get_data() argument 1343 struct ufile *file; read_record() local 1438 calc_percentage(struct ufile *file, ntfs_volume *vol) calc_percentage() argument 1563 dump_record(struct ufile *file) dump_record() argument 1687 list_record(struct ufile *file) list_record() argument 1749 name_match(regex_t *re, struct ufile *file) name_match() argument 1971 struct ufile *file; undelete_file() local 2229 struct ufile *file; scan_disk() local [all...] |
| /third_party/protobuf/src/google/protobuf/testing/ |
| H A D | file.cc | 32 // emulates google3/file/base/file.cc 34 #include <google/protobuf/testing/file.h> 75 FILE* file = fopen(name.c_str(), text_mode ? "rt" : "rb"); in ReadFileToString() local 76 if (file == NULL) return false; in ReadFileToString() 79 size_t n = fread(buffer, 1, sizeof(buffer), file); in ReadFileToString() 84 int error = ferror(file); in ReadFileToString() 85 if (fclose(file) != 0) return false; in ReadFileToString() 94 FILE* file = fopen(name.c_str(), "wb"); in WriteStringToFile() local 95 if (file in WriteStringToFile() 113 FILE* file = fopen(name.c_str(), "wb"); WriteStringToFileOrDie() local [all...] |