/freebsd/tests/sys/file/ |
H A D | fspacectl_test.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 36 #include <atf-c.h> 52 if (fstat(fd, &statbuf) == -1) in fill() 67 len -= blen; in fill() 80 if (statfs(".", &statfsbuf) == -1) in fd_get_blksize() 81 return (-1); in fd_get_blksize() 96 if (blocksize == -1) in check_content_dealloc() 107 hole_len = file_sz - hole_start; in check_content_dealloc() 124 resid -= blen; in check_content_dealloc() [all …]
|
H A D | ftruncate_test.c | 1 /*- 32 * - Make sure we get EISDIR on a directory. 71 * bytes now in the range of the file size return 0. in main() 73 * Save a read-only reference to the file to use later for read-only in main() 88 if (ftruncate(fd, -1) == 0) in main() 89 errx(1, "ftruncate(fd, -1) succeeded unexpectedly"); in main() 91 err(1, "ftruncate(fd, -1) returned wrong error"); in main() 100 errx(-1, "fstat with len=%jd returned len %jd up", in main() 103 size = pread(fd, &ch, sizeof(ch), len - 1); in main() 107 errx(-1, "pread len %jd size %jd up", in main() [all …]
|
/freebsd/tests/sys/posixshm/ |
H A D | posixshm_test.c | 1 /*- 50 #include <atf-c.h> 66 ATF_REQUIRE_MSG(mkstemp(path) != -1, in gen_a_test_path() 93 ATF_CHECK_MSG(fd == -1, "shm_open didn't fail"); in shm_open_should_fail() 106 ATF_CHECK_MSG(shm_unlink(path) == -1, "shm_unlink didn't fail"); in shm_unlink_should_fail() 114 * on success and -1 on failure. 175 close(fd); in verify_object() 201 len -= blen; in shm_fill() 228 hole_len = shm_sz - hole_start; in check_content_dealloc() 245 resid -= blen; in check_content_dealloc() [all …]
|
/freebsd/contrib/bearssl/src/x509/ |
H A D | asn1.t0 | 31 \ -- In the preamble, a macro called "CTX" that evaluates to the current 34 \ -- In the preamble, a macro called "CONTEXT_NAME" that evaluates to the 37 \ -- A word called "read8-low" ( -- x ) that reads the next byte, or -1 40 \ -- A word called "read-blob-inner" ( addr len -- addr len ) that is 41 \ the multi-byte version of read8-low. 43 \ -- A word called "skip-remaining-inner" ( lim -- lim ) which reads but 53 : skip-blanks begin char dup 32 > if ret then drop again ; 55 : fail-oid 60 : parse-number ( -- val nextchar ) 69 : encode7E ( val -- ) [all …]
|
H A D | x509_minimal.t0 | 29 * -------------------- 43 * -- If the certificate length is 0, then the T0 code will not be 47 * -- When reaching the end of certificate, the C code must verify that 53 * -- The error flag is set to a non-zero value when validation is 55 * successful) or another non-zero error code. When a non-zero error 59 * -- Each certificate is decoded in due course, with the following 62 * -- Start of the TBS: the multihash engine is reset and activated. 64 * -- Start of the issuer DN: the secondary hash engine is started, 67 * -- End of the issuer DN: the secondary hash engine is stopped. The 71 * -- Start of the subject DN: the secondary hash engine is started, [all …]
|
/freebsd/contrib/tcpdump/ |
H A D | smb.h | 2 * Copyright (C) Andrew Tridgell 1995-1999 5 * BSD-style license that accompanies tcpdump or the GNU GPL version 2 17 #define SMBclose 0x04 /* close file */ 25 #define SMBlock 0x0C /* lock byte range */ 26 #define SMBunlock 0x0D /* unlock byte range */ 40 #define SMBsplclose 0xC2 /* close print spool file */ 47 #define SMBsendstrt 0xD5 /* send start of multi-block message */ 48 #define SMBsendend 0xD6 /* send end of multi-block message */ 49 #define SMBsendtxt 0xD7 /* send text of multi-block message */ 52 #define SMBlockread 0x13 /* Lock a range and read */ [all …]
|
/freebsd/tests/sys/netinet/ |
H A D | ip6_v4mapped_test.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 49 #include <atf-c.h> 63 * Set first and last ports in the ipport range. Save the old values 74 * Pre-emptively unlink our restoration file, so we will do no in set_portrange() 115 /* Open the backup file, write the contents, and close it. */ in set_portrange() 133 error = close(fd); in set_portrange() 137 (void)close(fd); in set_portrange() 159 /* Open the backup file, read the contents, close it, and delete it. */ in restore_portrange() 176 error = close(fd); in restore_portrange() [all …]
|
/freebsd/lib/libsys/ |
H A D | closefrom.2 | 46 from the per-process object reference table. 55 inclusive, clamped to the range of open file descriptors. 59 .Bl -tag -width ".Dv CLOSE_RANGE_CLOEXEC" 61 Set the close-on-exec flag on descriptors in the range instead of closing them. 68 Otherwise, a value of -1 is returned and the global variable 76 .Bl -tag -width Er 87 .Xr close 2
|
/freebsd/crypto/heimdal/lib/krb5/ |
H A D | krb5_openlog.3 | 1 .\" Copyright (c) 1997, 1999, 2001 - 2002 Kungliga Tekniska Högskolan 48 Kerberos 5 Library (libkrb5, -lkrb5) 58 …*facility" "int min" "int max" "krb5_log_log_func_t log" "krb5_log_close_func_t close" "void *data" 97 To close a logging facility, use the 131 non-standard logging you can use the 141 .Fa close 149 max of infinity, pass -1. 161 .Bl -tag -width "xxx" -offset indent 197 Each destination may optionally be prepended with a range of logging 199 .Li min-max/ . [all …]
|
/freebsd/contrib/ntp/libntp/ |
H A D | socket.c | 2 * socket.c - low-level socket operations 27 * integer range. stdio usually will make use 28 * of the file descriptors in the range of 30 * in order to keep this range clean, for socket 36 * - keep a current socket fd boundary initialized with 37 * max(0, min(GETDTABLESIZE() - FD_CHUNK, FOPEN_MAX)) 38 * - attempt to move the descriptor to the boundary or 40 * - if that fails and boundary > 0 set boundary 41 * to min(0, socket_fd_boundary - FD_CHUN [all...] |
/freebsd/usr.sbin/pciconf/ |
H A D | pciconf.c | 93 "usage: pciconf -l [-BbcevV] [device]\n" in usage() 94 " pciconf -a device\n" in usage() 95 " pciconf -r [-b | -h] device addr[:addr2]\n" in usage() 96 " pciconf -w [-b | -h] device addr value\n" in usage() 97 " pciconf -D [-b | -h | -x] device bar [start [count]]" in usage() 113 while ((c = getopt(argc, argv, "aBbcDehlrwVv")) != -1) { in main() 236 if (ioctl(fd, PCIOCGETCONF, &pc) == -1) in list_devs() 250 close(fd); in list_devs() 255 close(fd); in list_devs() 266 *p->pd_name ? p->pd_name : "none", in list_devs() [all …]
|
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_load-key/ |
H A D | zfs_load-key_common.kshlib | 21 . $STF_SUITE/tests/functional/cli_root/zfs_load-key/zfs_load-key.cfg 25 # $1 - dataset 104 …log_must openssl req -x509 -newkey rsa:4096 -sha256 -days 1 -nodes -keyout "/$TESTPOOL/snakeoil.ke… 106 python3 -uc " 109 sys.stdin.close() 112 for i in range(1, 100): 113 port = random.randint(0xC000, 0xFFFF) # ephemeral range 131 os.chdir('$STF_SUITE/tests/functional/cli_root/zfs_load-key') 138 sys.stdout.close() 139 sys.stderr.close() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/AsmPrinter/ |
H A D | DbgEntityHistoryCalculator.cpp | 1 //===- llvm/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp -------------===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 45 // scope range which ends on a meta instruction should be considered to end in initialize() 50 // 1 DBG_VALUE for "y" number. If a scope range ends at DBG_VALUE for "y", in initialize() 53 // range. DBG_VALUEs at or after this position for in initialize() 64 assert(A->getParent() && B->getParent() && "Operands must have a parent"); in isBefore() 65 assert(A->getMF() == B->getMF() && in isBefore() 73 // Instruction range should start with a DBG_VALUE instruction for the in startDbgValue() 79 Entries.back().getInstr()->isEquivalentDbgInstr(MI)) { in startDbgValue() [all …]
|
/freebsd/usr.sbin/bluetooth/btpand/ |
H A D | client.c | 3 /*- 4 * SPDX-License-Identifier: BSD-2-Clause 62 if (fd == -1) { in client_init() 74 if (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { in client_init() 80 if (setsockopt(fd, SOL_L2CAP, SO_L2CAP_IMTU, &mru, sizeof(mru)) == -1) { in client_init() 90 if (connect(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { in client_init() 96 if (getsockopt(fd, SOL_L2CAP, SO_L2CAP_IMTU, &mru, &len) == -1) { in client_init() 106 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &n, &len) == -1) { in client_init() 112 if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &n, sizeof(n)) == -1) in client_init() 117 if (getsockopt(fd, SOL_L2CAP, SO_L2CAP_OMTU, &mtu, &len) == -1) { in client_init() [all …]
|
/freebsd/lib/libpmcstat/ |
H A D | libpmcstat_logging.c | 1 /*- 2 * Copyright (c) 2003-2008 Joseph Koshy 62 if (pr->pr_pmcid == pmcid) { in pmcstat_lookup_pmcid() 64 return pr->pr_merge; in pmcstat_lookup_pmcid() 86 if (pr->pr_pmcid == pmcid) { in pmcstat_pmcid_add() 87 pr->pr_pmcname = ps; in pmcstat_pmcid_add() 89 } else if (pr->pr_pmcname == ps) in pmcstat_pmcid_add() 99 pr->pr_pmcid = pmcid; in pmcstat_pmcid_add() 100 pr->pr_pmcname = ps; in pmcstat_pmcid_add() 101 pr->pr_pmcin = (*pmcstat_npmcs)++; in pmcstat_pmcid_add() [all …]
|
/freebsd/contrib/llvm-project/clang/include/clang/Rewrite/Core/ |
H A D | HTMLRewrite.h | 1 //==- HTMLRewrite.h - Translate source code into prettified HTML ---*- C++ -*-// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===// 32 /// and HighlightMacros() to it so that to avoid re-lexing the file each time. 37 /// HighlightRange - Highlight a range in the source code with the specified 39 /// start/end tags are placed at the start/end of each line if the range is 45 /// HighlightRange - Highlight a range in the source code with the specified 46 /// start/end tags. The Start/end of the range must be in the same file. 48 /// if the range is multiline. [all …]
|
/freebsd/usr.sbin/cdcontrol/ |
H A D | cdcontrol.1 | 28 .Bl -tag -width indent 66 .Ic - 72 .Bl -tag -width indent 99 Minutes are in the range 0-99. 100 Seconds are in the range 0-59. 101 Frame numbers are in the range 0-74. 124 .It Ic close 133 Allowed values are in the range 0-255. 139 Allowed values are in the range 0-255. 155 .Bl -tag -width ".Cm volume" -compact [all …]
|
/freebsd/sbin/hastd/ |
H A D | primary.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 5 * Copyright (c) 2010-2011 Pawel Jakub Dawidek <pawel@dawidek.net> 116 * until some in-progress requests are freed. 124 * send lists - each component gets the same request, but each component is 179 ((res)->hr_remotein != NULL && (res)->hr_remoteout != NULL) 211 hio_##name##_list_size[(ncomp)]--; \ 224 hio_##name##_list_size--; \ 229 #define ISFULLSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_FULLSYNC) 230 #define ISMEMSYNC(hio) ((hio)->hio_replication == HAST_REPLICATION_MEMSYNC) [all …]
|
/freebsd/tests/sys/kern/ |
H A D | sonewconn_overflow.py | 2 #- 3 # SPDX-License-Identifier: BSD-2-Clause 55 for i in range(0, cnt): 66 s.close() 68 self.ls.close() 88 os.system('/sbin/dmesg -c > /dev/null') 94 for i in range(0, 3):
|
/freebsd/contrib/dialog/samples/ |
H A D | dialog.py | 20 # I wrote this because I want to use my 486-33 laptop as my main 35 # (it's possible -- I've already tried :-). 37 # height and width defaults. Hmmm - should also then check for 39 # Put into a package name to make more reusable - reduce the possibility 43 # there is a bug in (at least) Linux-Mandrake 7.0 Russian Edition 44 # running on AMD K6-2 3D that causes core dump when 'dialog' 45 # is running with --gauge option; 51 # - 'gauge' widget *) 52 # - 'title' option to some widgets 53 # - 'checked' option to checklist dialog; clicking "Cancel" is now [all …]
|
/freebsd/tools/tools/kdrv/ |
H A D | KernelDriver | 2 # Tcl magic -*- tcl -*- \ 6 # KernelDriver - FreeBSD driver source installer 21 # 3. Neither the name of the author nor the names of any co-contributors 39 # KernelDriver provides a means for installing source-form drivers into FreeBSD 100 set candidate [glob -nocomplain "$hint/*.drvinfo"]; 170 switch -- [lindex $line 0] { 179 set plast [expr [string length $path] -1]; 189 set plast [expr [string length $path] -1]; 222 close $fh; 270 if {[lsearch -exact $unwritable $p] == -1} { [all …]
|
/freebsd/tools/regression/sockets/so_setfib/ |
H A D | so_setfib.c | 1 /*- 37 * 1. Get system wide number of FIBs from sysctl and convert to index (-= 1). 40 * 3. Do a sequence of -2, -1, 0, .. n, n+1, n+2 SO_SETFIB sockopt calls, 42 * 4. Try 3 random numbers. Calculate result based on valid range. 82 * Number of FIBs as read from net.fibs sysctl - 1. Initialize to clear out of 83 * bounds value to not accidentally run on a limited range. 85 static int rt_numfibs = -42; 93 * Handle result given on error and valid range and errno. 102 if (error == -1 && (i < 0 || i > rt_numfibs)) in so_setfib() 105 else if (error != -1 && (i < 0 || i > rt_numfibs)) in so_setfib() [all …]
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_write.3 | 1 .\" Copyright (c) 2003-2011 Tim Kientzle 32 Streaming Archive Library (libarchive, -larchive) 41 close the archive and release all resources. 97 Individual archive entries are written in a three-step 126 .Xr close 2 128 .Bd -literal -offset indent 149 mydata->fd = open(mydata->name, O_WRONLY | O_CREAT, 0644); 150 if (mydata->f [all...] |
/freebsd/tools/tools/locale/tools/ |
H A D | utf8-rollup.pl | 1 #!/usr/local/bin/perl -wC 3 # SPDX-License-Identifier: BSD-2-Clause 35 print "Usage: $0 --unidir=<unidir>\n"; 46 my $outfilename = "$UNIDIR/posix/xx_Comm_C.UTF-8.src"; 48 get_utf8map("$UNIDIR/posix/UTF-8.cm"); 60 my $ux = encode('UTF-32BE', decode('UTF-8', $k)); 77 close(FIN); 95 my $k = utf8to32($2); # UTF-8 char code 98 # print STDERR "register: $k - $v\n"; 110 # ----------------------------------------------------------------------------- [all …]
|
/freebsd/crypto/openssh/openbsd-compat/ |
H A D | bsd-pselect.c | 52 * Set up the descriptors. Because they are close-on-exec, in the case 53 * where sshd's re-exec fails notify_pipe will still point to a descriptor 56 * outside of the range used by sshd re-exec but within NFDBITS (so we don't 67 return -1; in pselect_notify_setup_fd() 68 (void)close(*fd); in pselect_notify_setup_fd() 89 if (notify_pipe[0] != -1) in pselect_notify_setup() 90 close(notify_pipe[0]); in pselect_notify_setup() 91 if (notify_pipe[1] != -1) in pselect_notify_setup() 92 close(notify_pipe[1]); in pselect_notify_setup() 94 if (pipe(notify_pipe) == -1) { in pselect_notify_setup() [all …]
|