| /freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_split/ |
| H A D | zpool_split_devices.ksh | 1 #!/bin/ksh -p 2 # SPDX-License-Identifier: CDDL-1.0 26 # 1. Create various (mirror-only) pools 27 # 2. Verify 'zpool split' can provide a list of devices to be included in the 28 # new pool. At most one disk from each mirror can be specified. 37 rm -fd $FILEDEV_PREFIX* $altroot 42 for filedev in "${fd[@]}"; do 43 truncate -s $SPA_MINDEVSIZE "$filedev" 45 log_must zpool create -f $TESTPOOL $conf 51 typeset altroot="$TESTDIR/altroot-$TESTPOOL2" [all …]
|
| /freebsd/sys/contrib/device-tree/Bindings/net/can/ |
| H A D | xilinx_can.txt | 1 Xilinx Axi CAN/Zynq CANPS controller Device Tree Bindings 2 --------------------------------------------------------- 5 - compatible : Should be: 6 - "xlnx,zynq-can-1.0" for Zynq CAN controllers 7 - "xlnx,axi-can-1.00.a" for Axi CAN controllers 8 - "xlnx,canfd-1.0" for CAN FD controllers 9 - "xlnx,canfd-2.0" for CAN FD 2.0 controllers 10 - reg : Physical base address and size of the controller 12 - interrupts : Property with a value describing the interrupt 14 - clock-names : List of input clock names [all …]
|
| /freebsd/contrib/capsicum-test/ |
| H A D | ioctl.cc | 9 #include "capsicum-test.h" 12 // capability-wrapped ones. 19 int fd = open("/etc/passwd", O_RDONLY); in TEST() local 20 EXPECT_OK(fd); in TEST() 21 int fd_no = dup(fd); in TEST() 23 EXPECT_OK(cap_rights_limit(fd, &rights_ioctl)); in TEST() 28 EXPECT_OK(ioctl(fd, FIONREAD, &bytes)); in TEST() 32 EXPECT_OK(ioctl(fd, FIOCLEX, &one)); in TEST() 35 close(fd); in TEST() 41 int fd = open("/etc/passwd", O_RDONLY); in TEST() local [all …]
|
| H A D | fcntl.cc | 17 #include "capsicum-test.h" 21 // capability-wrapped ones. 35 sprintf(shm_name, "/capsicum-test-%d", getuid()); in FORK_TEST() 37 if ((files["SHM"] == -1) && errno == ENOSYS) { in FORK_TEST() 38 // shm_open() is not implemented in user-mode Linux. in FORK_TEST() 46 std::string key = ii->first + " cap"; in FORK_TEST() 47 caps[key] = dup(ii->second); in FORK_TEST() 49 EXPECT_OK(caps[key]) << " on " << ii->first; in FORK_TEST() 57 // Ensure that we can fcntl() all the files that we opened above. in FORK_TEST() 61 EXPECT_OK(fcntl(ii->second, F_GETFL, 0)) << " on " << ii->first; in FORK_TEST() [all …]
|
| /freebsd/contrib/sendmail/libsm/ |
| H A D | local.h | 2 * Copyright (c) 2000-2002, 2004-2006 Proofpoint, Inc. and its suppliers. 11 * forth in the LICENSE file which can be found at the top level of 14 * $Id: local.h,v 1.59 2013-11-22 20:51:43 ca Exp $ 83 ((((fp)->f_flags & SMWR) == 0 || (fp)->f_bf.smb_base == NULL) && \ 91 #define HASUB(fp) ((fp)->f_ub.smb_base != NULL) 94 if ((fp)->f_ub.smb_base != (fp)->f_ubuf) \ 95 sm_free((char *)(fp)->f_ub.smb_base); \ 96 (fp)->f_ub.smb_base = NULL; \ 113 ** SM_CONVERT_TIME -- convert the API timeout flag for select() usage. 116 ** file descriptor (fd) if possible. The 'fd' is needed to possibly [all …]
|
| /freebsd/contrib/libarchive/libarchive/ |
| H A D | archive_read_open_filename.c | 1 /*- 2 * Copyright (c) 2003-2010 Tim Kientzle 74 int fd; member 131 strcpy(mine->filename.m, filename); in archive_read_open_filenames() 132 mine->block_size = block_size; in archive_read_open_filenames() 133 mine->fd = -1; in archive_read_open_filenames() 134 mine->buffer = NULL; in archive_read_open_filenames() 135 mine->st_mode = mine->use_lseek = 0; in archive_read_open_filenames() 137 mine->filename_type = FNT_STDIN; in archive_read_open_filenames() 139 mine->filename_type = FNT_MBS; in archive_read_open_filenames() [all …]
|
| /freebsd/stand/kboot/kboot/ |
| H A D | init.c | 1 /*- 4 * SPDX-License-Identifier: BSD-2-Clause 8 * Mini-init(8) so we can run as init/pid 1 in a LinuxBoot environment. 17 * sysvinit, u-root, and initramfs-tools do. This is a minimal environment 18 * for modern Linux systems, though the /tmp, /run and /var stuff can likely 19 * be done inside the initrd image itself (as can creating the mount points 23 * operations generally can't fail, but if they do, we may not have the ability 41 * Create compat links: /dev/fd lives in /proc, and needs some help to in init_fs_env() 44 host_symlink("/proc/self/fd", "/dev/fd"); in init_fs_env() 45 host_symlink("fd/0", "/dev/stdin"); in init_fs_env() [all …]
|
| /freebsd/contrib/ntp/sntp/libevent/ |
| H A D | epoll.c | 2 * Copyright 2000-2007 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2007-2012 Niels Provos, Nick Mathewson 27 #include "event2/event-config.h" 28 #include "evconfig-private.h" 54 #include "event-internal.h" 55 #include "evsignal-internal.h" 57 #include "evthread-internal.h" 58 #include "log-internal.h" 59 #include "evmap-internal.h" 60 #include "changelist-internal.h" [all …]
|
| /freebsd/contrib/libevent/ |
| H A D | epoll.c | 2 * Copyright 2000-2007 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2007-2012 Niels Provos, Nick Mathewson 27 #include "event2/event-config.h" 28 #include "evconfig-private.h" 54 #include "event-internal.h" 55 #include "evsignal-internal.h" 57 #include "evthread-internal.h" 58 #include "log-internal.h" 59 #include "evmap-internal.h" 60 #include "changelist-internal.h" [all …]
|
| /freebsd/contrib/netbsd-tests/rump/rumpkern/h_client/ |
| H A D | h_forkcli.c | 22 int fd, status; in simple() local 27 fd = rump_sys_open("/dev/null", O_CREAT | O_RDWR); in simple() 28 if (rump_sys_write(fd, &fd, sizeof(fd)) != sizeof(fd)) in simple() 35 case -1: in simple() 39 if (rumpclient_fork_init(rf) == -1) in simple() 47 /* check that we can access the fd, the close it and exit */ in simple() 48 if (rump_sys_write(fd, &fd, sizeof(fd)) != sizeof(fd)) in simple() 50 rump_sys_close(fd); in simple() 54 * check that we can access the fd, wait for the child, and in simple() 55 * check we can still access the fd in simple() [all …]
|
| /freebsd/crypto/openssl/doc/man3/ |
| H A D | SSL_set_fd.pod | 5 SSL_set_fd, SSL_set_rfd, SSL_set_wfd - connect the SSL object with a file descriptor 11 int SSL_set_fd(SSL *ssl, int fd); 12 int SSL_set_rfd(SSL *ssl, int fd); 13 int SSL_set_wfd(SSL *ssl, int fd); 17 SSL_set_fd() sets the file descriptor B<fd> as the input/output facility 18 for the TLS/SSL (encrypted) side of B<ssl>. B<fd> will typically be the 22 interface between the B<ssl> and B<fd>. The BIO and hence the SSL engine 23 inherit the behaviour of B<fd>. If B<fd> is nonblocking, the B<ssl> will 34 for the read channel or the write channel, which can be set independently. 38 The following return values can occur: [all …]
|
| /freebsd/sbin/nvmecontrol/ |
| H A D | ns.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 5 * Copyright (C) 2018-2019 Alexander Motin <mav@FreeBSD.org> 80 { arg_string, &active_opt.dev, "controller-id|namespace-id" }, 113 { arg_string, &controllers_opt.dev, "controller-id|namespace-id" }, 173 // OPT("block-size", 'b', arg_uint32, create_opt, block_size, 179 { arg_string, &create_opt.dev, "controller-id|namespace-id" }, 198 .nsid = NONE - 1, 203 OPT("namespace-id", 'n', arg_uint32, delete_opt, nsid, 209 { arg_string, &delete_opt.dev, "controller-id|namespace-id" }, [all …]
|
| /freebsd/stand/kboot/libkboot/ |
| H A D | dfk.c | 4 * SPDX-License-Identifier: BSD-2-Clause 48 int fd; member 51 // All the line_buffer stuff can be replaced by fgetstr() 55 int fd; member 69 lb->pos = lb->eos = lb->buf; // Reset to no data condition in lb_fill() 70 rv = read(lb->fd, lb->buf, sizeof(lb->buf)); in lb_fill() 73 lb->pos = lb->buf; in lb_fill() 74 lb->eos = lb->buf + rv; in lb_fill() 81 close(lb->fd); in lb_fini() 88 lb->fd = open(fn, O_RDONLY); in lb_init() [all …]
|
| /freebsd/stand/i386/loader/ |
| H A D | chain.c | 1 /*- 61 int fd, len, size = SECTOR_SIZE; in command_chain() local 79 fd = open(argv[1], O_RDONLY); in command_chain() 80 if (fd == -1) { in command_chain() 86 vctx = vectx_open(fd, argv[1], 0L, NULL, &verror, __func__); in command_chain() 88 sprintf(command_errbuf, "can't verify: %s", argv[1]); in command_chain() 89 close(fd); in command_chain() 95 if (verify_file(fd, argv[1], 0, VE_MUST, __func__) < 0) { in command_chain() 96 sprintf(command_errbuf, "can't verify: %s", argv[1]); in command_chain() 97 close(fd); in command_chain() [all …]
|
| /freebsd/contrib/netbsd-tests/fs/vfs/ |
| H A D | t_io.c | 3 /*- 32 #include <atf-c.h> 53 int fd; in holywrite() local 57 RL(fd = rump_sys_open("file", O_RDWR|O_CREAT|O_TRUNC, 0666)); in holywrite() 60 RL(rump_sys_pwrite(fd, buf, 1, getpagesize())); in holywrite() 63 RL(rump_sys_pwrite(fd, buf, 2, getpagesize()-1)); in holywrite() 68 RL(rump_sys_pread(fd, b2, therange, 0)); in holywrite() 71 memset(b3 + getpagesize() - 1, 'B', 2); in holywrite() 75 rump_sys_close(fd); in holywrite() 84 int fd; in extendbody() local [all …]
|
| /freebsd/lib/libcasper/services/cap_fileargs/tests/ |
| H A D | fileargs_test.c | 1 /*- 34 #include <atf-c.h> 64 strncpy(files[i], template, sizeof(template) - 1); in prepare_files() 70 fds[i] = -1; in prepare_files() 85 if (fds[i] != -1) in clear_files() 93 int fd; in test_file_open() local 95 fd = fileargs_open(fa, file); in test_file_open() 96 if (fd < 0) in test_file_open() 100 *fdp = fd; in test_file_open() 202 test_file_mode(int fd, int mode) in test_file_mode() argument [all …]
|
| /freebsd/tools/tools/zfsboottest/ |
| H A D | zfsboottest.c | 1 /*- 59 int fd; in ldi_get_size() local 61 fd = *(int *)priv; in ldi_get_size() 62 if (fstat(fd, &sb) != 0) in ldi_get_size() 64 if (S_ISCHR(sb.st_mode) && ioctl(fd, DIOCGMEDIASIZE, &sb.st_size) != 0) in ldi_get_size() 78 int fd = *(int *)priv; in vdev_read() local 80 if (pread(fd, buf, bytes, off) != bytes) in vdev_read() 81 return (-1); in vdev_read() 88 const znode_phys_t *zp = (const znode_phys_t *) dn->dn_bonus; in zfs_read() 93 if (off + n > zp->zp_size) in zfs_read() [all …]
|
| /freebsd/sbin/ipf/ipf/ |
| H A D | ipf.4 | 3 ipf \- packet filtering kernel interface 13 ioctl(fd, SIOCADDFR, struct frentry **) 14 ioctl(fd, SIOCDELFR, struct frentry **) 15 ioctl(fd, SIOCIPFFL, int *) 21 ioctl(fd, SIOCADAFR, struct frentry **) (same as SIOCADDFR) 22 ioctl(fd, SIOCRMAFR, struct frentry **) (same as SIOCDELFR) 23 ioctl(fd, SIOCADIFR, struct frentry **) 24 ioctl(fd, SIOCRMIFR, struct frentry **) 25 ioctl(fd, SIOCINAFR, struct frentry **) 26 ioctl(fd, SIOCINIFR, struct frentry **) [all …]
|
| /freebsd/contrib/libpcap/ |
| H A D | pcap-dlpi.c | 24 * <List-tcpdump-workers@subscriptions.pizzolato.net>, 29 * Packet capture routine for DLPI under SunOS 5, HP-UX 9/10/11, and AIX. 33 * - The DLIOCRAW ioctl() is specific to SunOS. 35 * - There is a bug in bufmod(7) such that setting the snapshot 38 * - It might be desirable to use pfmod(7) to filter packets in the 41 * - An older version of the HP-UX DLPI Programmer's Guide, which 45 * http://docs.hp.com/hpux/onlinedocs/B2355-90093/B2355-90093.html 47 * but is no longer available; it can still be found at 49 * http://h21007.www2.hp.com/dspp/files/unprotected/Drivers/Docs/Refs/B2355-90093.pdf 53 * - The HP-UX 10.x, 11.0, and 11i v1.6 version of the HP-UX DLPI [all …]
|
| /freebsd/secure/lib/libcrypto/man/man3/ |
| H A D | SSL_set_fd.3 | 1 .\" -*- mode: troff; coding: utf-8 -*- 58 .TH SSL_SET_FD 3ossl 2025-09-30 3.5.4 OpenSSL 64 SSL_set_fd, SSL_set_rfd, SSL_set_wfd \- connect the SSL object with a file descriptor 70 \& int SSL_set_fd(SSL *ssl, int fd); 71 \& int SSL_set_rfd(SSL *ssl, int fd); 72 \& int SSL_set_wfd(SSL *ssl, int fd); 76 \&\fBSSL_set_fd()\fR sets the file descriptor \fBfd\fR as the input/output facility 77 for the TLS/SSL (encrypted) side of \fBssl\fR. \fBfd\fR will typically be the 81 interface between the \fBssl\fR and \fBfd\fR. The BIO and hence the SSL engine 82 inherit the behaviour of \fBfd\fR. If \fBfd\fR is nonblocking, the \fBssl\fR will [all …]
|
| /freebsd/usr.bin/tip/libacu/ |
| H A D | ventel.c | 4 /*- 5 * SPDX-License-Identifier: BSD-3-Clause 60 #define DELAY(n) do { long N = (n); while (--N > 0); } while (0) 74 if (!vensync(FD)) { in ven_dialer() 75 printf("can't synchronize with ventel\n"); in ven_dialer() 77 logent(value(HOST), num, "ventel", "can't synch up"); in ven_dialer() 84 tcgetattr(FD, &cntrl); in ven_dialer() 86 tcsetattr(FD, TCSANOW, &cntrl); in ven_dialer() 90 write(FD, cp, 1); in ven_dialer() 93 write(FD, "\r", 1); in ven_dialer() [all …]
|
| /freebsd/share/doc/psd/05.sysman/ |
| H A D | 2.1.t | 35 may occur in a non-blocking or asynchronous fashion are 36 common to all system-defined abstractions and are described here. 40 The \fIread\fP and \fIwrite\fP system calls can be applied 44 cc = read(fd, buf, nbytes); 45 result int cc; int fd; result caddr_t buf; int nbytes; 47 cc = write(fd, buf, nbytes); 48 result int cc; int fd; caddr_t buf; int nbytes; 51 object defined by \fIfd\fP to the buffer at address \fIbuf\fP of 53 returned in \fIcc\fP, which is \-1 if a return occurred before 54 any data was transferred because of an error or use of non-blocking [all …]
|
| /freebsd/sys/contrib/openzfs/lib/libzfs/os/linux/ |
| H A D | libzfs_pool_os.c | 1 // SPDX-License-Identifier: CDDL-1.0 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or https://opensource.org/licenses/CDDL-1.0. 29 * Copyright (c) 2017 Open-E, Inc. All Rights Reserved. 63 int fd, error; in zpool_relabel_disk() local 65 if ((fd = open(path, O_RDWR|O_DIRECT|O_CLOEXEC)) < 0) { in zpool_relabel_disk() 76 error = efi_use_whole_disk(fd); in zpool_relabel_disk() 79 (void) fsync(fd); in zpool_relabel_disk() 80 (void) ioctl(fd, BLKFLSBUF); in zpool_relabel_disk() 82 (void) close(fd); in zpool_relabel_disk() [all …]
|
| /freebsd/sys/contrib/openzfs/lib/libspl/ |
| H A D | backtrace.c | 1 // SPDX-License-Identifier: CDDL-1.0 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or https://opensource.org/licenses/CDDL-1.0. 33 * Output helpers. libspl_backtrace() must not block, must be thread-safe and 35 * printf, so we end up having to call write() directly on the fd. That's 40 #define spl_bt_write_n(fd, s, n) \ argument 41 do { ssize_t r __maybe_unused = write(fd, s, n); } while (0) 42 #define spl_bt_write(fd, s) spl_bt_write_n(fd, s, sizeof (s)-1) argument 46 * libunwind-gcc and libunwind-llvm both list registers using an enum, 48 * a given architecture in different ways. We can check which one is defined [all …]
|
| /freebsd/contrib/llvm-project/lldb/source/Utility/ |
| H A D | SelectHelper.cpp | 1 //===-- SelectHelper.cpp --------------------------------------------------===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 10 // Enable this special support for Apple builds where we can have unlimited 19 #include "lldb/lldb-enumerations.h" 20 #include "lldb/lldb-types.h" 49 void SelectHelper::FDSetRead(lldb::socket_t fd) { in FDSetRead() argument 50 m_fd_map[fd].read_set = true; in FDSetRead() 53 void SelectHelper::FDSetWrite(lldb::socket_t fd) { in FDSetWrite() argument 54 m_fd_map[fd].write_set = true; in FDSetWrite() [all …]
|