Lines Matching refs:rv
226 int rv = -1; in dhcp_find_opt() local
233 return rv; in dhcp_find_opt()
243 rv = i; in dhcp_find_opt()
253 return rv; in dhcp_find_opt()
373 int rv = 0; in pxechn_parse_fn() local
379 rv = 1; in pxechn_parse_fn()
399 rv = 2; in pxechn_parse_fn()
401 rv = 3; in pxechn_parse_fn()
403 rv = 4; in pxechn_parse_fn()
405 rv = 3 + ( 1 << 30 ); in pxechn_parse_fn()
407 rv = -1; in pxechn_parse_fn()
424 return rv; in pxechn_parse_fn()
435 int rv = -1; in pxechn_fill_pkt() local
438 rv = -2; in pxechn_fill_pkt()
441 if ((rv >= -1) && (!pxe_get_cached_info(ptype, in pxechn_fill_pkt()
447 rv = 0; in pxechn_fill_pkt()
456 if (rv <= -1) { in pxechn_fill_pkt()
660 int rv = 0, optnum, opttype; in pxechn_parse_setopt() local
692 dprintf_pc_so_s("s.len=%d\trv=%d\n", iopt->len, rv); in pxechn_parse_setopt()
705 rv = pxechn_setopt(&(opts[optnum]), (void *)(iopt->data), iopt->len); in pxechn_parse_setopt()
708 dprintf_pc_so_s("rv=%d\n", rv); in pxechn_parse_setopt()
709 return rv; in pxechn_parse_setopt()
714 uint32_t rv = 0; in pxechn_parse_force() local
719 rv = strtoul(istr, &pos, 0); in pxechn_parse_force()
720 if ((istr == pos ) || ((rv == ULONG_MAX) && (errno))) in pxechn_parse_force()
721 rv = 0; in pxechn_parse_force()
723 return rv; in pxechn_parse_force()
747 int arg, optnum, rv = 0; in pxechn_parse_args() local
763 while ((rv >= 0) && (arg = getopt(argc, argv, optstr)) >= 0) { in pxechn_parse_args()
778 rv = pxechn_parse_setopt(opts, &iopt, optarg); in pxechn_parse_args()
792 rv = -3; in pxechn_parse_args()
805 rv = -'?'; in pxechn_parse_args()
809 if (rv >= 0) /* Clear it since getopt() doesn't guarentee it */ in pxechn_parse_args()
816 if (rv >= 0) { in pxechn_parse_args()
817 rv = 0; in pxechn_parse_args()
821 dprintf("pxechn_parse_args rv=%d\n", rv); in pxechn_parse_args()
822 return rv; in pxechn_parse_args()
892 int rv = -1; in dhcp_pkt2pxe() local
896 rv = 1; in dhcp_pkt2pxe()
905 rv = 2; in dhcp_pkt2pxe()
912 rv = 3; in dhcp_pkt2pxe()
917 return rv; in dhcp_pkt2pxe()
967 int rv = 0; in pxechn() local
978 rv = pxechn_args(argc, argv, &pxe); in pxechn()
980 if (rv) in pxechn()
987 rv = -2; in pxechn()
1000 rv = pxechn_mergeopt(&pxe, 2, 1); in pxechn()
1001 if (rv) { in pxechn()
1002 dprintf("Merge Option returned %d\n", rv); in pxechn()
1004 rv = dhcp_pack_packet(p[5], (size_t *)&(pxe.p[5].len), pxe.opts[2]); in pxechn()
1005 rv = dhcp_pkt2pxe(p[5], pxe.p[5].len, PXENV_PACKET_TYPE_DHCP_ACK); in pxechn()
1011 rv = dhcp_pkt2pxe(p[5], pxe.p[5].len, PXENV_PACKET_TYPE_CACHED_REPLY); in pxechn()
1019 rv = dhcp_pkt2pxe(p[5], pxe.p[5].len, PXENV_PACKET_TYPE_DHCP_ACK); in pxechn()
1038 rv = dhcp_pkt2pxe(p[1], pxe.p[1].len, PXENV_PACKET_TYPE_DHCP_ACK); in pxechn()
1042 return rv; in pxechn()
1052 int rv = 0; in pxe_restart() local
1062 rv = pxechn_parse_fn(pxe.fn, &(pxe.fip), pxe.host, &(pxe.fp)); in pxe_restart()
1063 if ((rv > 2) || (rv < 0)) { in pxe_restart()
1088 return rv; in pxe_restart()
1102 int rv = 0; in pxechn_gpxe() local
1109 return rv; in pxechn_gpxe()
1114 int rv= -1; in main() local
1133 rv = pxechn(argc - 1, &argv[1]); in main()
1138 rv = pxe_restart(argv[2]); in main()
1140 rv = pxechn(argc - 1, &argv[1]); in main()
1143 if (rv <= -1 ) { in main()
1145 rv = 1; in main()
1147 return rv; in main()