/illumos-gate/usr/src/cmd/power/ |
H A D | parse.c | 220 size_t size; in get_conf_data() local 228 size = (size_t)stbuf.st_size; in get_conf_data() 231 if ((buf = malloc(size + 1)) == NULL) in get_conf_data() 233 nread = read(fd, buf, size); in get_conf_data() 235 if (nread != (ssize_t)size) in get_conf_data() 237 size, nread, name); in get_conf_data() 238 *(buf + size) = '\0'; in get_conf_data() 250 size_t size; in newarg() local 254 size = alcnt * sizeof (*line_args); in newarg() 255 if ((line_args = realloc(line_args, size)) == NULL) in newarg() [all …]
|
/illumos-gate/usr/src/stand/lib/fs/nfs/ |
H A D | nfsops.c | 70 static ssize_t boot_nfs_read(int fd, caddr_t buf, size_t size); 74 static int boot_nfs_getdents(int fd, struct dirent *dep, unsigned size); 255 boot_nfs_read(int fd, char *buf, size_t size) in boot_nfs_read() argument 271 printf("boot_nfs_read(%d, %x, 0x%x)\n", fd, buf, size); in boot_nfs_read() 280 count = nfsread(&filep->file, buf, size); in boot_nfs_read() 283 count = nfs3read(&filep->file, buf, size); in boot_nfs_read() 286 count = nfs4read(&filep->file, buf, size); in boot_nfs_read() 434 boot_nfs_getdents(int fd, struct dirent *dep, unsigned size) in boot_nfs_getdents() argument 441 printf("boot_nfs_getdents(%d, 0x%x, 0x%x)\n", fd, dep, size); in boot_nfs_getdents() 455 status = nfsgetdents(&filep->file, dep, size); in boot_nfs_getdents() [all …]
|
/illumos-gate/usr/src/cmd/sendmail/libsm/ |
H A D | strio.c | 61 sm_strgrow(s, size) in sm_strgrow() argument 63 size_t size; 67 if (s->strio_size >= size) 69 p = sm_realloc(s->strio_base, size); 73 s->strio_end = s->strio_base + size; 74 s->strio_size = size; 474 sm_strio_init(fp, buf, size) in sm_strio_init() argument 477 size_t size; 483 fp->f_bf.smb_size = fp->f_w = (size ? size - 1 : 0);
|
/illumos-gate/usr/src/cmd/mkmsgs/ |
H A D | mkmsgs.c | 126 unsigned size; /* used for argument to malloc */ local 184 size = L_locale + strlen(localep) + 186 if ((pathoutp = malloc(2 * (size + 1))) == NULL) { 188 cmdname, size); 191 localedirp = pathoutp + size + 1; 298 size = sizeof(int) + num_msgs * sizeof(int) + buf.st_size; 300 if ( (bufoutp = (int *)malloc((uint)size)) == NULL ) { 302 cmdname, size); 343 if (fwrite((char *)bufinp, sizeof(*bufinp), size, fp_outp) != size) {
|
/illumos-gate/usr/src/uts/common/fs/smbclnt/netsmb/ |
H A D | smb2_sign.c | 221 int size; in smb2_compute_MAC() local 241 size = SMB2_HDRLEN; in smb2_compute_MAC() 242 bcopy(m->b_rptr, tmp_hdr, size); in smb2_compute_MAC() 244 rc = ops->mac_update(ctx, tmp_hdr, size); in smb2_compute_MAC() 252 size = MBLKL(m) - SMB2_HDRLEN; in smb2_compute_MAC() 253 rc = ops->mac_update(ctx, m->b_rptr + SMB2_HDRLEN, size); in smb2_compute_MAC() 260 size = MBLKL(m); in smb2_compute_MAC() 261 if (size > 0) { in smb2_compute_MAC() 262 rc = ops->mac_update(ctx, m->b_rptr, size); in smb2_compute_MAC()
|
/illumos-gate/usr/src/cmd/nscd/ |
H A D | nscd_biggest.c | 49 int size, guess, base, last; in insertn() local 55 size = table[0].num; in insertn() 56 if (table[size].num < n) /* biggest so far */ in insertn() 57 guess = size; in insertn() 60 last = size; in insertn()
|
/illumos-gate/usr/src/cmd/bhyve/ |
H A D | kernemu_dev.c | 48 apic_handler(struct vcpu *vcpu, int dir, uint64_t addr, int size, in apic_handler() argument 52 size, val) != 0) in apic_handler() 60 .size = PAGE_SIZE, 68 .size = VIOAPIC_SIZE, 75 .size = VHPET_SIZE,
|
/illumos-gate/usr/src/lib/udapl/udapl_tavor/common/ |
H A D | dapl_cookie.c | 134 IN DAT_COUNT size) in dapls_cb_create() argument 143 size++; in dapls_cb_create() 146 while (size > i) { in dapls_cb_create() 149 size = i; in dapls_cb_create() 151 buffer->pool = dapl_os_alloc(size * sizeof (DAPL_COOKIE)); in dapls_cb_create() 153 buffer->pool_size = size; in dapls_cb_create() 157 for (i = 0; i < size; i++) { in dapls_cb_create() 413 cookie->val.dto.size = 0; in dapls_dto_cookie_alloc()
|
/illumos-gate/usr/src/uts/sun4u/os/ |
H A D | mach_ddi_impl.c | 170 int size; in getlongprop_buf() local 172 size = prom_getproplen((pnode_t)id, name); in getlongprop_buf() 173 if (size <= 0 || (size > maxlen - 1)) in getlongprop_buf() 185 if (buf[size - 1] != '\0') { in getlongprop_buf() 186 buf[size] = '\0'; in getlongprop_buf() 187 size += 1; in getlongprop_buf() 191 return (size); in getlongprop_buf()
|
/illumos-gate/usr/src/cmd/srchtxt/ |
H A D | srchtxt.c | 95 size_t size; in main() local 164 if ((addr = attach(cp, len1, &fd, &size)) == -1) { in main() 173 (void) munmap((caddr_t)addr, size); in main() 188 if ((addr = attach(pathname, len, &fd, &size)) == -1) { in main() 194 (void) munmap((caddr_t)addr, size); in main() 232 attach(path, len, fdescr, size) in attach() argument 236 size_t *size; 249 *size = sb.st_size;
|
/illumos-gate/usr/src/uts/common/fs/tmpfs/ |
H A D | tmp_subr.c | 110 tmp_memalloc(size_t size, int musthave) in tmp_memalloc() argument 115 if (atomic_add_long_nv(&tmp_kmemspace, size) < tmpfs_maxkmem || in tmp_memalloc() 117 return (kmem_zalloc(size, KM_SLEEP)); in tmp_memalloc() 119 atomic_add_long(&tmp_kmemspace, -size); in tmp_memalloc() 129 tmp_memfree(void *cp, size_t size) in tmp_memfree() argument 131 kmem_free(cp, size); in tmp_memfree() 132 atomic_add_long(&tmp_kmemspace, -size); in tmp_memfree()
|
/illumos-gate/usr/src/uts/common/io/cxgbe/common/ |
H A D | common.c | 39 int size, void *rpl) in t4_wr_mbox_ns() argument 41 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, false); in t4_wr_mbox_ns() 45 const void *cmd, int size, void *rpl, in t4_wr_mbox_timeout() argument 48 return t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, true, in t4_wr_mbox_timeout() 116 int size, void *rpl) in t4_wr_mbox() argument 118 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, true); in t4_wr_mbox()
|
/illumos-gate/usr/src/cmd/mailx/ |
H A D | stralloc.c | 66 salloc(unsigned size) in salloc() argument 73 s = size; in salloc() 119 srealloc(void *optr, unsigned size) in srealloc() argument 128 s = size; in srealloc() 145 nptr = salloc(size); in srealloc() 147 memcpy(nptr, optr, size); /* XXX - copying too much */ in srealloc()
|
/illumos-gate/usr/src/lib/libprtdiag_psr/sparc/ontario/common/ |
H A D | erie.h | 102 char name[], char loc[], int size); 105 int erie_get_name(picl_nodehdl_t nodeh, char name[], int size); 106 int erie_get_model(picl_nodehdl_t nodeh, char model[], int size); 107 int erie_get_path(picl_nodehdl_t nodeh, char path[], int size); 108 int erie_get_class(picl_nodehdl_t nodeh, char piclclass[], int size);
|
H A D | huron.h | 108 char name[], char loc[], int size); 109 int huron_get_name(picl_nodehdl_t nodeh, char name[], int size); 110 int huron_get_model(picl_nodehdl_t nodeh, char model[], int size); 111 int huron_get_path(picl_nodehdl_t nodeh, char path[], int size); 112 int huron_get_class(picl_nodehdl_t nodeh, char piclclass[], int size);
|
/illumos-gate/usr/src/tools/smatch/src/ |
H A D | compat-mingw.c | 36 void *blob_alloc(unsigned long size) in blob_alloc() argument 39 ptr = malloc(size); in blob_alloc() 41 memset(ptr, 0, size); in blob_alloc() 45 void blob_free(void *addr, unsigned long size) in blob_free() argument
|
H A D | sset.c | 16 unsigned int size = last - first + 1; in sset_init() local 17 struct sset *s = malloc(sizeof(*s) + size * 2 * sizeof(s->sets[0])); in sset_init() 19 s->size = size; in sset_init()
|
/illumos-gate/usr/src/cmd/fm/fmd/common/ |
H A D | fmd_nv.c | 32 fmd_nv_alloc(nv_alloc_t *nva, size_t size) in fmd_nv_alloc() argument 34 return (fmd_alloc(size, FMD_SLEEP)); in fmd_nv_alloc() 39 fmd_nv_free(nv_alloc_t *nva, void *buf, size_t size) in fmd_nv_free() argument 41 fmd_free(buf, size); in fmd_nv_free()
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | calloc.c | 39 calloc(size_t num, size_t size) in calloc() argument 44 if (num == 0 || size == 0) in calloc() 47 total = num * size; in calloc() 50 if (total / num != size) { in calloc()
|
/illumos-gate/usr/src/uts/common/io/qede/ |
H A D | qede_osal.c | 97 size, type); in qede_osal_dma_sync() 119 __func__, qede->instance, size); in qede_osal_zalloc() 124 new_entry->size = size; in qede_osal_zalloc() 151 __func__, qede->instance, size); in qede_osal_alloc() 156 new_entry->size = size; in qede_osal_alloc() 180 kmem_free(addr, mem_entry->size); in qede_osal_free() 194 size_t size) in qede_osal_dma_alloc_coherent() argument 231 __func__, qede->instance, size); in qede_osal_dma_alloc_coherent() 252 new_entry->size = size; in qede_osal_dma_alloc_coherent() 276 dma_addr_t paddr, size_t size) in qede_osal_dma_free_coherent() argument [all …]
|
/illumos-gate/usr/src/cmd/eeprom/i386/ |
H A D | benv.c | 681 size_t size; in add_pair() local 701 size = sizeof (v); in add_pair() 709 size = sizeof (v); in add_pair() 721 size = sizeof (v); in add_pair() 733 size = sizeof (v); in add_pair() 745 size = sizeof (v); in add_pair() 757 size = sizeof (v); in add_pair() 769 size = sizeof (v); in add_pair() 781 size = sizeof (v); in add_pair() 793 size = sizeof (v); in add_pair() [all …]
|
/illumos-gate/usr/src/cmd/sendmail/db/txn/ |
H A D | txn_auto.c | 43 logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) 45 if ((ret = __os_malloc(logrec.size, NULL, &logrec.data)) != 0) 58 if ((u_int32_t)(bp - (u_int8_t *)logrec.data) != logrec.size) 305 + sizeof(u_int32_t) + (xid == NULL ? 0 : xid->size) 327 memcpy(bp, &xid->size, sizeof(xid->size)); 328 bp += sizeof(xid->size); 329 memcpy(bp, xid->data, xid->size); 330 bp += xid->size; 388 for (i = 0; i < argp->xid.size; i++) { 432 memcpy(&argp->xid.size, bp, sizeof(u_int32_t)); [all …]
|
/illumos-gate/usr/src/lib/libc/port/stdio/ |
H A D | _findbuf.c | 60 int size = BUFSIZ; in _findbuf() local 75 size = _SMBFSZ - PUSHBACK; in _findbuf() 96 size = stbuf.st_blksize; in _findbuf() 99 if ((buf = (Uchar *)malloc(sizeof (Uchar)*(size+_SMBFSZ))) != in _findbuf() 110 endbuf = iop->_base + size; in _findbuf()
|
/illumos-gate/usr/src/uts/common/crypto/io/ |
H A D | cryptoadm.c | 500 size_t size; in load_dev_disabled() local 541 entries = kmem_alloc(size, KM_SLEEP); in load_dev_disabled() 545 kmem_free(entries, size); in load_dev_disabled() 552 kmem_free(entries, size); in load_dev_disabled() 580 size_t size; in load_soft_disabled() local 622 entries = kmem_alloc(size, KM_SLEEP); in load_soft_disabled() 626 kmem_free(entries, size); in load_soft_disabled() 633 kmem_free(entries, size); in load_soft_disabled() 663 size_t size; in load_soft_config() local 708 kmem_free(entries, size); in load_soft_config() [all …]
|
/illumos-gate/usr/src/uts/common/io/qede/579xx/drivers/ecore/ |
H A D | ecore_init_ops.c | 85 osal_size_t size) in ecore_init_store_rt_agg() argument 100 u16 size, in ecore_init_rt() argument 111 for (i = 0; i < size; i++) { in ecore_init_rt() 176 u32 size, const u32 *p_buf, argument 191 for (i = 0; i < size; i++) 197 addr, size, 0); 245 u32 size; local 286 size = GET_FIELD(data, 292 size, array_data, 300 size = GET_FIELD(data, [all …]
|