Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 1881) sorted by path

12345678910>>...76

/illumos-gate/usr/src/boot/common/
H A Dbcache.c186 char *buf, size_t *rsize) in write_strategy() argument
200 return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); in write_strategy()
210 char *buf, size_t *rsize) in read_strategy() argument
251 buf, size); in read_strategy()
343 buf, size); in read_strategy()
359 char *buf, size_t *rsize) in bcache_strategy() argument
379 return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, in bcache_strategy()
402 buf + total, &isize); in bcache_strategy()
424 return (write_strategy(devdata, F_WRITE, blk, size, buf, in bcache_strategy()
H A Dbootstrap.h80 size_t size, char *buf, size_t *rsize);
88 size_t size, char *buf, size_t *rsize);
H A Dcommands.c132 char buf[81]; /* XXX buffer size? */ in command_help() local
137 snprintf(buf, sizeof (buf), "%s/boot/loader.help", getenv("loaddev")); in command_help()
138 if ((hfd = open(buf, O_RDONLY)) < 0) { in command_help()
187 while (fgetstr(buf, 80, hfd) >= 0 && in command_help()
188 buf[0] != '#') { in command_help()
189 if (pager_output(buf)) in command_help()
396 char buf[256]; /* XXX size? */ in command_read() local
435 ngets(buf, sizeof (buf)); in command_read()
438 setenv(name, buf, 1); in command_read()
H A Ddev_net.c234 size_t size __unused, char *buf __unused, size_t *rsize __unused) in net_strategy()
252 char buf[MAXHOSTNAMELEN]; in net_getparams() local
295 if (bp_getfile(sock, "gateway", &gateip, buf) == 0) { in net_getparams()
297 smask = ip_convertaddr(buf); in net_getparams()
H A Ddisk.c62 static char buf[80]; in display_size() local
77 snprintf(buf, sizeof (buf), "%4" PRIu64 "%cB", size, unit); in display_size()
78 return (buf); in display_size()
82 ptblread(void *d, void *buf, size_t blocks, uint64_t offset) in ptblread() argument
101 blocks * od->sectorsize, (char *)buf, NULL)); in ptblread()
177 disk_read(struct disk_devdesc *dev, void *buf, uint64_t offset, uint_t blocks) in disk_read() argument
184 blocks * od->sectorsize, buf, NULL); in disk_read()
190 disk_write(struct disk_devdesc *dev, void *buf, uint64_t offset, uint_t blocks) in disk_write() argument
197 blocks * od->sectorsize, buf, NULL); in disk_write()
397 static char buf[128]; in disk_fmtdev() local
[all …]
H A Dgfx_fb.c252 char buf[2]; in gfx_set_colors() local
261 snprintf(buf, sizeof (buf), "%d", val); in gfx_set_colors()
262 evalue = buf; in gfx_set_colors()
340 char *env, buf[2]; in gfx_framework_init() local
395 snprintf(buf, sizeof (buf), "%d", gfx_fg); in gfx_framework_init()
396 env_setenv("tem.fg_color", EV_VOLATILE, buf, gfx_set_colors, in gfx_framework_init()
398 snprintf(buf, sizeof (buf), "%d", gfx_bg); in gfx_framework_init()
399 env_setenv("tem.bg_color", EV_VOLATILE, buf, gfx_set_colors, in gfx_framework_init()
1198 gfx_fb_cursor_impl(void *buf, uint32_t stride, uint32_t fg, uint32_t bg, in gfx_fb_cursor_impl() argument
1215 p = buf; in gfx_fb_cursor_impl()
[all …]
H A Dgpt.c321 gptread(const uuid_t *uuid, struct dsk *dskp, char *buf) in gptread() argument
329 secbuf = buf; in gptread()
H A Dgpt.h33 int gptread(const uuid_t *uuid, struct dsk *dskp, char *buf);
H A Dinstall.c107 char buf[1024]; in read_metatags() local
112 fsize = read(fd, buf, sizeof(buf)); in read_metatags()
123 if (fsize == sizeof(buf)) in read_metatags()
126 buf[fsize] = '\0'; in read_metatags()
128 tag = buf; in read_metatags()
186 static char buf[256]; in install() local
238 if (strlen(devname) + strlen(pkgname) + 2 > sizeof(buf)) { in install()
242 sprintf(buf, "%s:%s", devname, pkgname); in install()
243 setenv("install_package", buf, 1); in install()
245 error = pkgfs_init(buf, proto); in install()
[all …]
H A Dinterp_parse.c24 static int insert(int *argcp, char *buf);
56 free(buf); \
89 char token, tmp, quote, dquote, *buf; in parse() local
100 buf = malloc(PARSE_BUFSIZE); in parse()
110 buf[i++] = *p++; in parse()
115 buf[i++] = *p++; in parse()
123 buf[i++] = *p++; in parse()
130 buf[i] = '\0'; in parse()
131 PARSE_FAIL(insert(&ac, buf)); in parse()
144 buf[i++] = *p++; in parse()
[all …]
H A Dls.c63 char *buf, *path; in command_ls() local
120 buf = malloc(strlen(path) + strlen(d->d_name) + 2); in command_ls()
121 if (buf != NULL) { in command_ls()
122 sprintf(buf, "%s/%s", path, d->d_name); in command_ls()
124 if (stat(buf, &sb)) { in command_ls()
128 free(buf); in command_ls()
H A Dmd.c87 md_strategy(void *devdata, int rw, daddr_t blk, size_t size, char *buf, in md_strategy() argument
111 bcopy(md_image.start + ofs, buf, size); in md_strategy()
114 bcopy(buf, md_image.start + ofs, size); in md_strategy()
H A Dmisc.c102 char buf[256]; in kern_bzero() local
105 bzero(buf, sizeof(buf)); in kern_bzero()
108 chunk = min(sizeof(buf), resid); in kern_bzero()
109 archsw.arch_copyin(buf, dest, chunk); in kern_bzero()
146 void *buf; in alloc_pread() local
148 buf = malloc(len); in alloc_pread()
149 if (buf == NULL) { in alloc_pread()
159 free(buf); in alloc_pread()
162 if ((size_t)read(fd, buf, len) != len) { in alloc_pread()
166 free(buf); in alloc_pread()
[all …]
H A Dpart.c261 uint8_t *buf, *tbl; in ptable_gptread() local
266 buf = malloc(table->sectorsize); in ptable_gptread()
267 if (buf == NULL) in ptable_gptread()
271 free(buf); in ptable_gptread()
275 if (dread(dev, buf, 1, 1) != 0) { in ptable_gptread()
282 phdr = gpt_checkhdr((struct gpt_hdr *)buf, 1, table->sectors - 1, in ptable_gptread()
297 if (dread(dev, buf, 1, offset) != 0) in ptable_gptread()
300 phdr = gpt_checkhdr((struct gpt_hdr *)buf, offset, in ptable_gptread()
374 free(buf); in ptable_gptread()
414 uint8_t *buf; in ptable_ebrread() local
[all …]
H A Dpart.h78 typedef int (diskread_t)(void *arg, void *buf, size_t blocks, uint64_t offset);
H A Dtem.c203 tem_write(tem_vt_state_t tem_arg, uint8_t *buf, ssize_t len) in tem_write() argument
212 tem_terminal_emulate(tem, buf, len); in tem_write()
743 char buf[80]; in tem_save_state() local
753 snprintf(buf, sizeof (buf), "%d", active->tvs_c_cursor.col); in tem_save_state()
754 setenv("tem.cursor.col", buf, 1); in tem_save_state()
755 snprintf(buf, sizeof (buf), "%d", active->tvs_c_cursor.row); in tem_save_state()
756 setenv("tem.cursor.row", buf, 1); in tem_save_state()
1081 tem_terminal_emulate(struct tem_vt_state *tem, uint8_t *buf, int len) in tem_terminal_emulate() argument
1086 for (; len > 0; len--, buf++) in tem_terminal_emulate()
1087 tem_input_byte(tem, *buf); in tem_terminal_emulate()
H A Dutil.c122 char buf[32], *s; in printf() local
165 s = buf; in printf()
175 while (--s >= buf) in printf()
H A Dutil.h41 #define bzero(buf, size) memset((buf), 0, (size)) argument
H A Dvdisk.c248 char *buf, size_t *rsize) in vdisk_strategy() argument
277 rv = read(vd->vdisk_fd, buf, size); in vdisk_strategy()
280 rv = write(vd->vdisk_fd, buf, size); in vdisk_strategy()
/illumos-gate/usr/src/boot/common/linenoise/
H A Dexample.c7 void completion(const char *buf, linenoiseCompletions *lc) { in completion() argument
8 if (buf[0] == 'h') { in completion()
H A Dlinenoise.c125 char *buf; /* Edited line buffer. */ member
224 completionCallback(ls->buf,&lc); in completeLine()
236 ls->buf = lc.cvec[i]; in completeLine()
240 ls->buf = saved.buf; in completeLine()
264 nwritten = snprintf(ls->buf,ls->buflen,"%s",lc.cvec[i]); in completeLine()
340 char *buf = l->buf; in refreshSingleLine() local
346 buf++; in refreshSingleLine()
360 abAppend(&ab,buf,len); in refreshSingleLine()
410 abAppend(&ab,l->buf,l->len); in refreshMultiLine()
464 l->buf[l->pos] = c; in linenoiseEditInsert()
[all …]
/illumos-gate/usr/src/boot/efi/libefi/
H A Ddevicename.c177 static char buf[SPECNAMELEN + 1]; in efi_fmtdev() local
181 strlcpy(buf, "(no device)", sizeof (buf)); in efi_fmtdev()
191 snprintf(buf, sizeof (buf), "%s%d:", dev->d_dev->dv_name, in efi_fmtdev()
196 return (buf); in efi_fmtdev()
H A Defi_console.c606 uint8_t buf = c; in efi_cons_putchar() local
612 tem_write(tem, &buf, sizeof (buf)); in efi_cons_putchar()
808 CHAR16 buf[2]; in efi_cons_efiputchar() local
811 buf[0] = c; in efi_cons_efiputchar()
812 buf[1] = 0; /* terminate string */ in efi_cons_efiputchar()
814 status = conout->TestString(conout, buf); in efi_cons_efiputchar()
816 buf[0] = '?'; in efi_cons_efiputchar()
817 conout->OutputString(conout, buf); in efi_cons_efiputchar()
H A Definet.c146 void *buf; in efinet_put() local
158 buf = NULL; /* XXX Is this needed? */ in efinet_put()
159 status = net->GetStatus(net, NULL, &buf); in efinet_put()
164 } while (status == EFI_SUCCESS && buf == NULL); in efinet_put()
178 char *buf, *ptr; in efinet_get() local
186 buf = malloc(bufsz + ETHER_ALIGN); in efinet_get()
187 if (buf == NULL) in efinet_get()
189 ptr = buf + ETHER_ALIGN; in efinet_get()
195 *pkt = buf; in efinet_get()
204 free(buf); in efinet_get()
H A Defipart.c983 char *buf) in efipart_readwrite() argument
997 nblks * blkio->Media->BlockSize, buf); in efipart_readwrite()
1003 nblks * blkio->Media->BlockSize, buf); in efipart_readwrite()
1018 char *buf, size_t *rsize) in efipart_strategy() argument
1046 size, buf, rsize)); in efipart_strategy()
1048 return (bcache_strategy(&bcd, rw, blk, size, buf, rsize)); in efipart_strategy()
1053 char *buf, size_t *rsize) in efipart_realstrategy() argument
1122 if (ioalign > 1 && (uintptr_t)buf != roundup2((uintptr_t)buf, ioalign)) in efipart_realstrategy()
1133 blkbuf = buf; in efipart_realstrategy()
1166 bcopy(blkbuf + blkoff, buf, blksz); in efipart_realstrategy()
[all …]

12345678910>>...76