| /openbsd-src/usr.sbin/ldomd/ |
| H A D | ds.c | 44 ldc_rx_ctrl(struct ldc_conn *lc, struct ldc_pkt *lp) in ldc_rx_ctrl() argument 46 switch (lp->ctrl) { in ldc_rx_ctrl() 48 ldc_rx_ctrl_vers(lc, lp); in ldc_rx_ctrl() 52 ldc_rx_ctrl_rts(lc, lp); in ldc_rx_ctrl() 56 ldc_rx_ctrl_rtr(lc, lp); in ldc_rx_ctrl() 60 ldc_rx_ctrl_rdx(lc, lp); in ldc_rx_ctrl() 64 DPRINTF(("CTRL/0x%02x/0x%02x\n", lp->stype, lp->ctrl)); in ldc_rx_ctrl() 71 ldc_rx_ctrl_vers(struct ldc_conn *lc, struct ldc_pkt *lp) in ldc_rx_ctrl_vers() argument 73 struct ldc_pkt *lvp = (struct ldc_pkt *)lp; in ldc_rx_ctrl_vers() 75 switch (lp->stype) { in ldc_rx_ctrl_vers() [all …]
|
| /openbsd-src/sys/net/ |
| H A D | trunklacp.c | 208 struct lacp_port *lp = LACP_PORT(tp); in lacp_input() local 209 struct lacp_softc *lsc = lp->lp_lsc; in lacp_input() 210 struct lacp_aggregator *la = lp->lp_aggregator; in lacp_input() 224 mq_enqueue(&lp->lp_mq, m); in lacp_input() 235 if ((lp->lp_state & LACP_STATE_COLLECTING) == 0 || in lacp_input() 249 struct lacp_port *lp; in lacp_input_process() local 253 LIST_FOREACH(lp, &lsc->lsc_ports, lp_next) { in lacp_input_process() 254 while ((m = mq_dequeue(&lp->lp_mq)) != NULL) { in lacp_input_process() 260 lacp_pdu_input(lp, m); in lacp_input_process() 264 lacp_marker_input(lp, m); in lacp_input_process() [all …]
|
| /openbsd-src/usr.sbin/lpd/ |
| H A D | lp.c | 61 lp_getprinter(struct lp_printer *lp, const char *name) in lp_getprinter() argument 66 memset(lp, 0, sizeof(*lp)); in lp_getprinter() 70 r = readent(lp, buf); in lp_getprinter() 92 lp_clearprinter(lp); in lp_getprinter() 105 lp_scanprinters(struct lp_printer *lp) in lp_scanprinters() argument 120 memset(lp, 0, sizeof(*lp)); in lp_scanprinters() 121 r = readent(lp, buf); in lp_scanprinters() 133 lp_clearprinter(lp); in lp_scanprinters() 141 readent(struct lp_printer *lp, char *buf) in readent() argument 148 lp->lp_name = strdup(buf); in readent() [all …]
|
| /openbsd-src/gnu/usr.bin/binutils/gdb/ |
| H A D | linux-nat.c | 623 static int stop_wait_callback (struct lwp_info *lp, void *data); 654 struct lwp_info *lp, *lpnext; in init_lwp_list() local 656 for (lp = lwp_list; lp; lp = lpnext) in init_lwp_list() 658 lpnext = lp->next; in init_lwp_list() 659 xfree (lp); in init_lwp_list() 674 struct lwp_info *lp; in add_lwp() local 678 lp = (struct lwp_info *) xmalloc (sizeof (struct lwp_info)); in add_lwp() 680 memset (lp, 0, sizeof (struct lwp_info)); in add_lwp() 682 lp->waitstatus.kind = TARGET_WAITKIND_IGNORE; in add_lwp() 684 lp->ptid = ptid; in add_lwp() [all …]
|
| /openbsd-src/sys/arch/hppa/hppa/ |
| H A D | disksubr.c | 54 struct disklabel *lp, int spoofonly) in readdisklabel() argument 59 if ((error = initdisklabel(lp))) in readdisklabel() 63 bp = geteblk(lp->d_secsize); in readdisklabel() 66 error = readliflabel(bp, strat, lp, NULL, spoofonly); in readdisklabel() 70 error = readdoslabel(bp, strat, lp, NULL, spoofonly); in readdisklabel() 75 error = iso_disklabelspoof(dev, strat, lp); in readdisklabel() 80 error = udf_disklabelspoof(dev, strat, lp); in readdisklabel() 96 struct disklabel *lp, daddr_t *partoffp, int spoofonly) in readliflabel() argument 105 error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp, in readliflabel() 117 error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp, in readliflabel() [all …]
|
| /openbsd-src/sys/arch/luna88k/luna88k/ |
| H A D | disksubr.c | 105 struct disklabel *lp, int spoofonly) in readdisklabel() argument 111 if ((error = initdisklabel(lp))) in readdisklabel() 115 bp = geteblk(lp->d_secsize); in readdisklabel() 121 error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp, LABELSECTOR)); in readdisklabel() 127 error = disklabel_om_to_bsd(bp->b_dev, slp, lp); in readdisklabel() 131 error = checkdisklabel(bp->b_dev, bp->b_data + LABELOFFSET, lp, 0, in readdisklabel() 132 DL_GETDSIZE(lp)); in readdisklabel() 137 error = readdoslabel(bp, strat, lp, NULL, spoofonly); in readdisklabel() 142 error = iso_disklabelspoof(dev, strat, lp); in readdisklabel() 160 writedisklabel(dev_t dev,void (* strat)(struct buf *),struct disklabel * lp) writedisklabel() argument 242 disklabel_om_to_bsd(dev_t dev,struct sun_disklabel * sl,struct disklabel * lp) disklabel_om_to_bsd() argument 371 disklabel_bsd_to_om(struct disklabel * lp,struct sun_disklabel * sl) disklabel_bsd_to_om() argument [all...] |
| /openbsd-src/sys/arch/sparc64/dev/ |
| H A D | ldc.c | 44 ldc_rx_ctrl(struct ldc_conn *lc, struct ldc_pkt *lp) in ldc_rx_ctrl() argument 46 switch (lp->ctrl) { in ldc_rx_ctrl() 48 ldc_rx_ctrl_vers(lc, lp); in ldc_rx_ctrl() 52 ldc_rx_ctrl_rts(lc, lp); in ldc_rx_ctrl() 56 ldc_rx_ctrl_rtr(lc, lp); in ldc_rx_ctrl() 60 ldc_rx_ctrl_rdx(lc, lp); in ldc_rx_ctrl() 64 DPRINTF(("CTRL/0x%02x/0x%02x\n", lp->stype, lp->ctrl)); in ldc_rx_ctrl() 71 ldc_rx_ctrl_vers(struct ldc_conn *lc, struct ldc_pkt *lp) in ldc_rx_ctrl_vers() argument 73 switch (lp->stype) { in ldc_rx_ctrl_vers() 76 if (lp->major == LDC_VERSION_MAJOR && in ldc_rx_ctrl_vers() [all …]
|
| /openbsd-src/sys/arch/sparc64/sparc64/ |
| H A D | disksubr.c | 61 struct disklabel *lp, int spoofonly) in readdisklabel() argument 67 if ((error = initdisklabel(lp))) in readdisklabel() 69 lp->d_flags |= D_VENDOR; in readdisklabel() 80 if (iso_disklabelspoof(dev, strat, lp) == 0) in readdisklabel() 84 if (udf_disklabelspoof(dev, strat, lp) == 0) in readdisklabel() 91 bp = geteblk(lp->d_secsize); in readdisklabel() 97 error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp, LABELSECTOR)); in readdisklabel() 103 error = disklabel_sun_to_bsd(bp->b_dev, slp, lp); in readdisklabel() 107 error = checkdisklabel(bp->b_dev, bp->b_data + LABELOFFSET, lp, 0, in readdisklabel() 108 DL_GETDSIZE(lp)); in readdisklabel() [all …]
|
| /openbsd-src/sbin/disklabel/ |
| H A D | disklabel.c | 297 parsedisktab(char *type, struct disklabel *lp) in parsedisktab() argument 304 *lp = *dp; in parsedisktab() 308 writelabel(int f, struct disklabel *lp) in writelabel() argument 310 lp->d_magic = DISKMAGIC; in writelabel() 311 lp->d_magic2 = DISKMAGIC; in writelabel() 312 lp->d_checksum = 0; in writelabel() 313 lp->d_checksum = dkcksum(lp); in writelabel() 317 if (ioctl(f, DIOCWDINFO, lp) == -1) { in writelabel() 327 mpsave(lp); in writelabel() 393 makedisktab(FILE *f, struct disklabel *lp) in makedisktab() argument [all …]
|
| H A D | editor.c | 171 void psize(u_int64_t sz, char unit, const struct disklabel *lp); 556 allocate_diskchunk(const struct disklabel *lp, in allocate_diskchunk() argument 565 chunk = free_chunks(lp, -1); in allocate_diskchunk() 570 maxstop = largest.start + DL_BLKTOSEC(lp, sa->maxsz); in allocate_diskchunk() 574 if (lp->d_flags & D_VENDOR) { in allocate_diskchunk() 575 largest.start = ROUNDUP(largest.start, lp->d_secpercyl); in allocate_diskchunk() 576 maxstop = ROUNDUP(maxstop, lp->d_secpercyl); in allocate_diskchunk() 578 maxstop -= lp->d_secpercyl; in allocate_diskchunk() 585 if (CHUNKSZ(&largest) < DL_BLKTOSEC(lp, sa->minsz)) in allocate_diskchunk() 592 allocate_partition(struct disklabel *lp, struct space_allocation *sa) in allocate_partition() argument [all …]
|
| /openbsd-src/sys/arch/luna88k/stand/boot/ |
| H A D | ufs_disksubr.c | 116 readdisklabel(struct scsi_softc *sc, uint tgt, struct disklabel *lp) in readdisklabel() argument 129 if (DL_GETDSIZE(lp) == 0) in readdisklabel() 130 DL_SETDSIZE(lp, 0x1fffffff); in readdisklabel() 131 lp->d_npartitions = 1; in readdisklabel() 132 if (DL_GETPSIZE(&lp->d_partitions[0]) == 0) in readdisklabel() 133 DL_SETPSIZE(&lp->d_partitions[0], 0x1fffffff); in readdisklabel() 134 DL_SETPSIZE(&lp->d_partitions[0], 0); in readdisklabel() 150 lp->d_magic = DISKMAGIC; in readdisklabel() 151 lp->d_magic2 = DISKMAGIC; in readdisklabel() 152 memcpy(lp->d_packname, slp->sl_text, sizeof(lp->d_packname)); in readdisklabel() [all …]
|
| /openbsd-src/sys/arch/macppc/macppc/ |
| H A D | disksubr.c | 60 struct disklabel *lp, int spoofonly) in readdisklabel() argument 65 if ((error = initdisklabel(lp))) in readdisklabel() 69 bp = geteblk(lp->d_secsize); in readdisklabel() 72 error = readdpmelabel(bp, strat, lp, NULL, spoofonly); in readdisklabel() 76 error = readdoslabel(bp, strat, lp, NULL, spoofonly); in readdisklabel() 81 error = iso_disklabelspoof(dev, strat, lp); in readdisklabel() 86 error = udf_disklabelspoof(dev, strat, lp); in readdisklabel() 102 struct disklabel *lp, daddr_t *partoffp, int spoofonly) in readdpmelabel() argument 105 long long hfspartend = DL_GETDSIZE(lp); in readdpmelabel() 109 error = readdisksector(bp, strat, lp, DL_BLKTOSEC(lp, LABELSECTOR)); in readdpmelabel() [all …]
|
| /openbsd-src/usr.sbin/rpc.statd/ |
| H A D | procs.c | 90 MonList *lp; in sm_mon_1_svc() local 116 lp = malloc(sizeof(MonList)); in sm_mon_1_svc() 117 if (!lp) in sm_mon_1_svc() 120 strncpy(lp->notifyHost, arg->mon_id.my_id.my_name, in sm_mon_1_svc() 122 lp->notifyProg = arg->mon_id.my_id.my_prog; in sm_mon_1_svc() 123 lp->notifyVers = arg->mon_id.my_id.my_vers; in sm_mon_1_svc() 124 lp->notifyProc = arg->mon_id.my_id.my_proc; in sm_mon_1_svc() 125 memcpy(lp->notifyData, arg->priv, in sm_mon_1_svc() 126 sizeof(lp->notifyData)); in sm_mon_1_svc() 128 lp->next = hp->monList; in sm_mon_1_svc() [all …]
|
| /openbsd-src/bin/ed/ |
| H A D | buf.c | 54 get_sbuf_line(line_t *lp) in get_sbuf_line() argument 60 if (lp == &buffer_head) in get_sbuf_line() 64 if (sfseek != lp->seek) { in get_sbuf_line() 65 sfseek = lp->seek; in get_sbuf_line() 72 len = lp->len; in get_sbuf_line() 90 line_t *lp; in put_sbuf_line() local 94 if ((lp = malloc(sizeof(line_t))) == NULL) { in put_sbuf_line() 104 free(lp); in put_sbuf_line() 113 free(lp); in put_sbuf_line() 124 free(lp); in put_sbuf_line() [all …]
|
| /openbsd-src/sys/arch/amd64/amd64/ |
| H A D | disksubr.c | 66 struct disklabel *lp, int spoofonly) in readdisklabel() argument 73 if ((error = initdisklabel(lp))) in readdisklabel() 85 lp->d_ntracks, lp->d_nsectors, lp->d_ncylinders, in readdisklabel() 87 DL_GETDSIZE(lp) / (pdi->bios_heads * pdi->bios_sectors)); in readdisklabel() 89 lp->d_ntracks = pdi->bios_heads; in readdisklabel() 90 lp->d_nsectors = pdi->bios_sectors; in readdisklabel() 91 lp->d_secpercyl = pdi->bios_sectors * pdi->bios_heads; in readdisklabel() 92 lp->d_ncylinders = DL_GETDSIZE(lp) / lp->d_secpercyl; in readdisklabel() 96 bp = geteblk(lp->d_secsize); in readdisklabel() 99 error = readdoslabel(bp, strat, lp, NULL, spoofonly); in readdisklabel() [all …]
|
| /openbsd-src/sys/arch/i386/i386/ |
| H A D | disksubr.c | 66 struct disklabel *lp, int spoofonly) in readdisklabel() argument 73 if ((error = initdisklabel(lp))) in readdisklabel() 85 lp->d_ntracks, lp->d_nsectors, lp->d_ncylinders, in readdisklabel() 87 DL_GETDSIZE(lp) / (pdi->bios_heads * pdi->bios_sectors)); in readdisklabel() 89 lp->d_ntracks = pdi->bios_heads; in readdisklabel() 90 lp->d_nsectors = pdi->bios_sectors; in readdisklabel() 91 lp->d_secpercyl = pdi->bios_sectors * pdi->bios_heads; in readdisklabel() 92 lp->d_ncylinders = DL_GETDSIZE(lp) / lp->d_secpercyl; in readdisklabel() 96 bp = geteblk(lp->d_secsize); in readdisklabel() 99 error = readdoslabel(bp, strat, lp, NULL, spoofonly); in readdisklabel() [all …]
|
| /openbsd-src/libexec/tradcpp/ |
| H A D | directive.c | 180 d_if(struct lineplace *lp, struct place *p2, char *line) in d_if() argument 202 ifstate_push(&lp->current, val); in d_if() 206 debuglog(&lp->current, "#if: %s", in d_if() 213 d_ifdef(struct lineplace *lp, struct place *p2, char *line) in d_ifdef() argument 221 ifstate_push(&lp->current, macro_isdefined(line)); in d_ifdef() 224 debuglog(&lp->current, "#ifdef %s: %s", in d_ifdef() 231 d_ifndef(struct lineplace *lp, struct place *p2, char *line) in d_ifndef() argument 239 ifstate_push(&lp->current, !macro_isdefined(line)); in d_ifndef() 242 debuglog(&lp->current, "#ifndef %s: %s", in d_ifndef() 249 d_elif(struct lineplace *lp, struct place *p2, char *line) in d_elif() argument [all …]
|
| /openbsd-src/usr.sbin/ac/ |
| H A D | ac.c | 268 struct user_list *lp; in show_users() local 270 for (lp = list; lp; lp = lp->next) in show_users() 271 show(lp->name, lp->secs); in show_users() 281 struct utmp_list *lp; in show_today() local 291 for (lp = logins; lp != NULL; lp = lp->next) { in show_today() 292 secs = yesterday - lp->usr.ut_time; in show_today() 293 Users = update_user(Users, lp->usr.ut_name, secs); in show_today() 294 lp->usr.ut_time = yesterday; /* as if they just logged in */ in show_today() 313 struct utmp_list *lp, *lp2, *tlp; in log_out() local 316 for (lp = head, lp2 = NULL; lp != NULL; ) in log_out() [all …]
|
| /openbsd-src/gnu/usr.bin/binutils-2.17/gas/config/ |
| H A D | atof-ieee.c | 262 LITTLENUM_TYPE *lp; in gen_to_words() local 441 lp = words; in gen_to_words() 473 *lp++ = word1; in gen_to_words() 483 *lp++ = 0; in gen_to_words() 488 *lp++ = 0; in gen_to_words() 491 *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS - (num_bits)); in gen_to_words() 497 *lp++ = word1; in gen_to_words() 499 *lp++ = 0; in gen_to_words() 501 *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS - num_bits); in gen_to_words() 507 *lp++ = word1; in gen_to_words() [all …]
|
| /openbsd-src/usr.sbin/ypserv/revnetgroup/ |
| H A D | parse_netgroup.c | 134 struct linelist *lp, *olp; in __endnetgrent() local 137 lp = linehead; in __endnetgrent() 138 while (lp) { in __endnetgrent() 139 olp = lp; in __endnetgrent() 140 lp = lp->l_next; in __endnetgrent() 173 struct linelist *lp = linehead; in parse_netgrp() local 178 while (lp) { in parse_netgrp() 179 if (!strcmp(group, lp->l_groupname)) in parse_netgrp() 181 lp in parse_netgrp() 277 struct linelist *lp; read_for_group() local [all...] |
| /openbsd-src/gnu/usr.bin/binutils/gas/config/ |
| H A D | atof-ieee.c | 272 LITTLENUM_TYPE *lp; local 450 lp = words; 482 *lp++ = word1; 492 *lp++ = 0; 497 *lp++ = 0; 500 *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS - (num_bits)); 506 *lp++ = word1; 508 *lp++ = 0; 510 *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS - num_bits); 516 *lp++ = word1; [all …]
|
| /openbsd-src/usr.bin/mg/ |
| H A D | window.c | 154 struct line *lp; in onlywind() local 183 lp = curwp->w_linep; in onlywind() 185 while (i != 0 && lback(lp) != curbp->b_headp) { in onlywind() 187 lp = lback(lp); in onlywind() 193 curwp->w_linep = lp; in onlywind() 208 struct line *lp; in splitwind() local 235 for (lp = curwp->w_linep, ntrd = 0; lp != curwp->w_dotp; in splitwind() 236 lp = lforw(lp)) in splitwind() 239 lp = curwp->w_linep; in splitwind() 245 lp = lforw(lp); in splitwind() [all …]
|
| /openbsd-src/usr.bin/paste/ |
| H A D | paste.c | 105 struct list *lp; in parallel() local 114 if ((lp = malloc(sizeof(*lp))) == NULL) in parallel() 118 lp->fp = stdin; in parallel() 119 else if ((lp->fp = fopen(p, "r")) == NULL) in parallel() 121 lp->cnt = cnt; in parallel() 122 lp->name = p; in parallel() 123 SIMPLEQ_INSERT_TAIL(&head, lp, entries); in parallel() 131 SIMPLEQ_FOREACH(lp, &head, entries) { in parallel() 132 if (lp->fp == NULL) { in parallel() 133 if (output && lp->cnt && in parallel() [all …]
|
| /openbsd-src/gnu/lib/libiberty/src/ |
| H A D | obstack.c | 306 register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ in _obstack_allocated_p() local 309 lp = (h)->chunk; in _obstack_allocated_p() 313 while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj)) in _obstack_allocated_p() 315 plp = lp->prev; in _obstack_allocated_p() 316 lp = plp; in _obstack_allocated_p() 318 return lp != 0; in _obstack_allocated_p() 332 register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ in _obstack_free() local 335 lp = h->chunk; in _obstack_free() 339 while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj)) in _obstack_free() 341 plp = lp->prev; in _obstack_free() [all …]
|
| /openbsd-src/usr.bin/lam/ |
| H A D | lam.c | 217 char *lp = linep; in pad() local 220 n = strlcpy(lp, ip->sepstring, line + sizeof(line) - lp); in pad() 221 lp += (n < line + sizeof(line) - lp) ? n : strlen(lp); in pad() 223 while (i++ < ip->minwidth && lp + 1 < line + sizeof(line)) in pad() 224 *lp++ = ' '; in pad() 225 *lp = '\0'; in pad() 226 return (lp); in pad() 239 char *lp = linep; in gatherline() local 257 n = strlcpy(lp, ip->sepstring, line + sizeof(line) - lp); in gatherline() 258 lp += (n < line + sizeof(line) - lp) ? n : strlen(lp); in gatherline() [all …]
|