Home
last modified time | relevance | path

Searched +full:min +full:- +full:len (Results 1 – 25 of 1034) sorted by relevance

12345678910>>...42

/freebsd/bin/sh/
H A Dmemalloc.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
102 size_t len; in savestr() local
104 len = strlen(s); in savestr()
105 p = ckmalloc(len + 1); in savestr()
106 memcpy(p, s, len + 1); in savestr()
116 * The size 496 was chosen because with 16-byte alignment the total size
148 sp->prev = stackp; in stnewblock()
150 stacknleft = allocsize - (stacknxt - (char*)sp); in stnewblock()
167 stacknleft -= nbytes; in stalloc()
[all …]
/freebsd/sys/contrib/zlib/
H A Dinftrees.c1 /* inftrees.c -- generate Huffman trees for efficient decoding
2 * Copyright (C) 1995-2024 Mark Adler
12 " inflate 1.3.1 Copyright 1995-2024 Mark Adler ";
22 The code lengths are lens[0..codes-1]. The result starts at *table,
23 whose indices are 0..2^bits-1. work is a writable array of at least
26 -1 is an invalid code, and +1 means that ENOUGH isn't enough. table
35 unsigned len; /* a code's length in bits */ in inflate_table() local
37 unsigned min, max; /* minimum and maximum code lengths */ in inflate_table() local
40 unsigned drop; /* code bits to drop for sub-table */ in inflate_table()
72 code lengths are lens[0..codes-1]. Each length corresponds to the in inflate_table()
[all …]
/freebsd/sys/opencrypto/
H A Dcriov.c3 /*-
58 KASSERT(len >= 0, ("%s: len %d < 0", __func__, len)); \
61 if (off < iov->iov_len) \
63 off -= iov->iov_len; \
64 iol--; \
71 KASSERT(len >= 0, ("%s: len %d < 0", __func__, len)); \
75 processed += PAGE_SIZE - off; \
76 off -= PAGE_SIZE - off; \
82 cuio_copydata(struct uio* uio, int off, int len, caddr_t cp) in cuio_copydata() argument
84 struct iovec *iov = uio->uio_iov; in cuio_copydata()
[all …]
/freebsd/usr.sbin/bhyve/
H A Dmevent_test.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
33 * cc mevent_test.c mevent.c -lpthread
67 uint64_t min, max, diff, sum, tsc_freq; in timer_print() local
68 size_t len; in timer_print() local
71 min = UINT64_MAX; in timer_print()
75 len = sizeof(tsc_freq); in timer_print()
76 sysctlbyname("machdep.tsc_freq", &tsc_freq, &len, NULL, 0); in timer_print()
80 diff = (tevbuf[j] - tevbuf[j-1]) * 1000000 / tsc_freq; in timer_print()
82 if (min > diff) in timer_print()
[all …]
/freebsd/crypto/heimdal/lib/krb5/
H A Dlog.c2 * Copyright (c) 1997-2006 Kungliga Tekniska Högskolan
40 int min; member
51 fp = realloc(f->val, (f->len + 1) * sizeof(*f->val)); in log_realloc()
54 f->len++; in log_realloc()
55 f->val = fp; in log_realloc()
56 fp += f->len - 1; in log_realloc()
107 { NULL, -1 }
113 while(table->s && strcasecmp(table->s, s)) in find_value()
115 return table->val; in find_value()
129 f->program = strdup(program); in krb5_initlog()
[all …]
/freebsd/lib/libc/stdio/
H A Dfvwrite.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
50 size_t len; in __sfvwrite() local
57 if (uio->uio_resid == 0) in __sfvwrite()
63 #define MIN(a, b) ((a) < (b) ? (a) : (b)) in __sfvwrite() macro
64 #define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n)) in __sfvwrite()
66 iov = uio->uio_iov; in __sfvwrite()
67 p = iov->iov_base; in __sfvwrite()
68 len = iov->iov_len; in __sfvwrite()
71 while (len == 0) { \ in __sfvwrite()
[all …]
/freebsd/crypto/heimdal/lib/asn1/
H A Dgen_decode.c2 * Copyright (c) 1997 - 2006 Kungliga Tekniska Högskolan
44 "e = decode_%s(p, len, %s, &l);\n" in decode_primitive()
51 "e = der_get_%s(p, len, %s, &l);\n" in decode_primitive()
52 "if(e) %s;\np += l; len -= l; ret += l;\n", in decode_primitive()
63 switch (t->type) { in find_tag()
139 *cl = t->tag.tagclass; in find_tag()
140 *ty = is_primitive_type(t->subtype->type) ? PRIM : CONS; in find_tag()
141 *tag = t->ta in find_tag()
[all...]
/freebsd/contrib/wpa/src/utils/
H A Dos_win32.c3 * Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
43 tt = (li.QuadPart - EPOCHFILETIME) / 10; in os_get_time()
44 t->sec = (os_time_t) (tt / 1000000); in os_get_time()
45 t->usec = (os_time_t) (tt % 1000000); in os_get_time()
56 t->sec = now.sec; in os_get_reltime()
57 t->usec = now.usec; in os_get_reltime()
62 int os_mktime(int year, int month, int day, int hour, int min, int sec, in os_mktime() argument
70 hour < 0 || hour > 23 || min < 0 || min > 59 || sec < 0 || in os_mktime()
72 return -1; in os_mktime()
75 tm.tm_year = year - 1900; in os_mktime()
[all …]
H A Dos_internal.c3 * Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
46 t->sec = tv.tv_sec; in os_get_time()
47 t->usec = tv.tv_usec; in os_get_time()
57 t->sec = tv.tv_sec; in os_get_reltime()
58 t->usec = tv.tv_usec; in os_get_reltime()
63 int os_mktime(int year, int month, int day, int hour, int min, int sec, in os_mktime() argument
69 hour < 0 || hour > 23 || min < 0 || min > 59 || sec < 0 || in os_mktime()
71 return -1; in os_mktime()
74 tm.tm_year = year - 1900; in os_mktime()
75 tm.tm_mon = month - 1; in os_mktime()
[all …]
/freebsd/sbin/nvmecontrol/modules/wdc/
H A Dwdc.c1 /*-
73 OPT("data-area", 'd', arg_uint8, opt, data_area,
74 "Data-area to retrieve up to"),
79 { arg_string, &opt.dev, "controller-id" },
84 .name = "cap-diag",
86 .descr = "Retrieve the cap-diag logs from the drive",
116 wdc_append_serial_name(int fd, char *buf, size_t len, const char *suffix) in wdc_append_serial_name() argument
122 len -= strlen(buf); in wdc_append_serial_name()
127 walker = sn + NVME_SERIAL_NUMBER_LENGTH - 1; in wdc_append_serial_name()
129 walker--; in wdc_append_serial_name()
[all …]
/freebsd/contrib/tcpdump/
H A Dprint-bfd.c19 * specification: draft-ietf-bfd-base-01 for version 0,
25 #include "netdissect-stdinc.h"
34 * Control packet, BFDv0, draft-ietf-bfd-base-01
38 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
40 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
42 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
44 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
45 * | Desired Min TX Interval |
46 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
47 * | Required Min RX Interval |
[all …]
H A Dprint-pfsync.c28 * $OpenBSD: print-pfsync.c,v 1.38 2012/09/19 13:50:36 mikeb Exp $
46 #include <netdissect-stdinc.h>
64 u_int caplen = h->caplen; in pfsync_if_print()
66 ts_print(ndo, &h->ts); in pfsync_if_print()
75 caplen - sizeof(struct pfsync_header)); in pfsync_if_print()
77 if (ndo->ndo_xflag) { in pfsync_if_print()
85 pfsync_ip_print(netdissect_options *ndo , const u_char *bp, u_int len) in pfsync_ip_print() argument
89 if (len < PFSYNC_HDRLEN || !ND_TTEST_LEN(bp, len)) in pfsync_ip_print()
93 len - sizeof(struct pfsync_header)); in pfsync_ip_print()
98 size_t len; member
[all …]
/freebsd/sys/rpc/rpcsec_gss/
H A Drpcsec_gss_prot.c4 SPDX-License-Identifier: BSD-3-Clause
60 u_int len;
63 val = p->value;
64 len = p->length;
65 ret = xdr_bytes(xdrs, &val, &len, MAX_GSS_SIZE);
66 p->value = val;
67 p->length = len;
79 proc = p->gc_proc; in xdr_rpc_gss_cred()
80 svc = p->gc_svc; in xdr_rpc_gss_cred()
81 ret = (xdr_u_int(xdrs, &p->gc_version) && in xdr_rpc_gss_cred()
[all …]
/freebsd/sys/dev/ipmi/
H A Dipmi_ssif.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
59 dump_buffer(device_t dev, const char *msg, u_char *bytes, int len) in dump_buffer() argument
64 for (i = 0; i < len; i++) in dump_buffer()
74 device_t dev = sc->ipmi_dev; in ssif_polled_request()
75 device_t smbus = sc->ipmi_ssif_smbus; in ssif_polled_request()
77 size_t len; in ssif_polled_request() local
88 ssif_buf[0] = req->ir_addr; in ssif_polled_request()
89 ssif_buf[1] = req->ir_command; in ssif_polled_request()
90 if (req->ir_requestlen > 0) in ssif_polled_request()
[all …]
/freebsd/sys/kern/
H A Dsubr_sglist.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
16 * 3. Neither the name of the author nor the names of any co-contributors
64 (sgsave).sg_nseg = (sg)->sg_nseg; \
66 (sgsave).ss_len = (sg)->sg_segs[(sgsave).sg_nseg - 1].ss_len; \
72 (sg)->sg_nseg = (sgsave).sg_nseg; \
74 (sg)->sg_segs[(sgsave).sg_nseg - 1].ss_len = (sgsave).ss_len; \
78 * Append a single (paddr, len) to a sglist. sg is the list and ss is
84 vm_paddr_t paddr, size_t len) in _sglist_append_range() argument
89 if (ss->ss_paddr + ss->ss_len == paddr) in _sglist_append_range()
[all …]
H A Duipc_mbuf.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
183 * to compiler-induced padding and alignment artifacts.
185 CTASSERT(MSIZE - offsetof(struct mbuf, m_dat) == MLEN);
186 CTASSERT(MSIZE - offsetof(struct mbuf, m_pktdat) == MHLEN);
189 * mbuf data storage should be 64-bit aligned regardless of architectural
196 * While the specific values here don't matter too much (i.e., +/- a few
199 * network-protocol and device-driver modules encode these layouts, and must
214 /* PowerPC booke has 64-bit physical pointers. */
242 KASSERT(m->m_flags & (M_EXT | M_EXTPG), in mb_dupcl()
[all …]
/freebsd/sys/dev/syscons/daemon/
H A Ddaemon_saver.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
63 " /- _ `-/ '",
67 " `-^--'`< '",
70 " `-----' /",
71 "<----. __ / __ \\",
72 "<----|====O)))==) \\) /====",
73 "<----' `--' `.__,' \\",
77 " ,' ,-----' |",
78 " `--{__________)",
[all …]
/freebsd/sys/dev/evdev/
H A Dcdev.c1 /*-
3 * Copyright (c) 2015-2016 Vladimir Kondratyev <wulf@FreeBSD.org>
104 struct evdev_dev *evdev = dev->si_drv1; in evdev_open()
113 buffer_size = evdev->ev_report_size * DEF_RING_REPORTS; in evdev_open()
119 client->ec_buffer_size = buffer_size; in evdev_open()
120 client->ec_buffer_head = 0; in evdev_open()
121 client->ec_buffer_tail = 0; in evdev_open()
122 client->ec_buffer_ready = 0; in evdev_open()
124 client->ec_evdev = evdev; in evdev_open()
125 mtx_init(&client->ec_buffer_mtx, "evclient", "evdev", MTX_DEF); in evdev_open()
[all …]
/freebsd/sys/contrib/device-tree/Bindings/display/panel/
H A Dpanel-timing.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/display/panel/panel-timing.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Thierry Reding <thierry.reding@gmail.com>
11 - Sam Ravnborg <sam@ravnborg.org>
20 +-------+----------+-------------------------------------+----------+
24 +-------+----------+-------------------------------------+----------+
28 +-------+----------#######################################----------+
32 | len | porch # | hactive # porch |
[all …]
/freebsd/sys/dev/le/
H A Dlance.c3 /*-
4 * SPDX-License-Identifier: BSD-2-Clause
35 /*-
109 ifp = sc->sc_ifp = if_alloc(IFT_ETHER); in lance_config()
111 callout_init_mtx(&sc->sc_wdog_ch, &sc->sc_mtx, 0); in lance_config()
128 ifmedia_init(&sc->sc_media, 0, lance_mediachange, lance_mediastatus); in lance_config()
129 if (sc->sc_supmedia != NULL) { in lance_config()
130 for (i = 0; i < sc->sc_nsupmedia; i++) in lance_config()
131 ifmedia_add(&sc->sc_media, sc->sc_supmedia[i], 0, NULL); in lance_config()
132 ifmedia_set(&sc->sc_media, sc->sc_defaultmedia); in lance_config()
[all …]
/freebsd/tests/sys/netinet/libalias/
H A Dutil.h2 * SPDX-License-Identifier: BSD-3-Clause
47 void hexdump(void *p, size_t len);
48 struct ip * ip_packet(u_char protocol, size_t len);
60 rand_range(int min, int max) in rand_range() argument
62 return min + rand()%(max - min); in rand_range()
67 int len = ntohs(pip->ip_len); \
68 pip->ip_src = src; \
69 pip->ip_dst = dst; \
70 res = LibAliasOut(la, pip, len); \
73 ATF_CHECK(addr_eq(msq, pip->ip_src)); \
[all …]
/freebsd/contrib/bmake/
H A Ddirname.c3 /*-
55 #ifndef MIN
56 # define MIN(a, b) ((a < b) ? a : b) macro
64 size_t len; in xdirname_r() local
72 len = 1; in xdirname_r()
77 endp = path + strlen(path) - 1; in xdirname_r()
79 endp--; in xdirname_r()
83 endp--; in xdirname_r()
87 len = 1; in xdirname_r()
92 endp--; in xdirname_r()
[all …]
/freebsd/crypto/openssl/crypto/evp/
H A Devp_key.c2 * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
44 * the DES library -- if someone ever wants to disable DES, this function
47 int EVP_read_pw_string(char *buf, int len, const char *prompt, int verify) in EVP_read_pw_string() argument
49 return EVP_read_pw_string_min(buf, 0, len, prompt, verify); in EVP_read_pw_string()
52 int EVP_read_pw_string_min(char *buf, int min, int len, const char *prompt, in EVP_read_pw_string_min() argument
55 int ret = -1; in EVP_read_pw_string_min()
64 if (UI_add_input_string(ui, prompt, 0, buf, min, in EVP_read_pw_string_min()
65 (len >= BUFSIZ) ? BUFSIZ - 1 : len) < 0 in EVP_read_pw_string_min()
67 && UI_add_verify_string(ui, prompt, 0, buff, min, in EVP_read_pw_string_min()
68 (len >= BUFSIZ) ? BUFSIZ - 1 : len, in EVP_read_pw_string_min()
[all …]
/freebsd/sys/netsmb/
H A Dsmb_smb.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2000-2001 Boris Popov
67 {-1, NULL}
81 if ((vcp->vc_sopt.sv_caps & SMB_CAP_LARGE_READX) && in smb_vc_maxread()
82 (vcp->vc_hflags2 & SMB_FLAGS2_SECURITY_SIGNATURE) == 0) in smb_vc_maxread()
85 return (vcp->vc_sopt.sv_maxtx - SMB_HDRLEN - 64); in smb_vc_maxread()
94 if ((vcp->vc_sopt.sv_caps & SMB_CAP_LARGE_WRITEX) && in smb_vc_maxwrite()
95 (vcp->vc_hflags2 & SMB_FLAGS2_SECURITY_SIGNATURE) == 0) in smb_vc_maxwrite()
98 return (vcp->vc_sopt.sv_maxtx - SMB_HDRLEN - 64); in smb_vc_maxwrite()
[all …]
/freebsd/usr.bin/tip/libacu/
H A Dhayes.c4 /*-
5 * SPDX-License-Identifier: BSD-3-Clause
63 #define min(a,b) ((a < b) ? a : b) macro
246 int len; in goodbye() local
264 ioctl(FD, FIONREAD, &len); in goodbye()
266 printf("goodbye1: len=%d -- ", len); in goodbye()
267 rlen = read(FD, dumbuf, min(len, DUMBUFLEN)); in goodbye()
274 ioctl(FD, FIONREAD, &len); in goodbye()
275 printf("goodbye2: len=%d -- ", len); in goodbye()
276 rlen = read(FD, dumbuf, min(len, DUMBUFLEN)); in goodbye()
[all …]

12345678910>>...42