Lines Matching +full:revision +full:- +full:id1

2  * SPDX-License-Identifier: BSD-2-Clause
52 * Offsets to the parameters of the 512-byte boot block.
124 int o_and, o_or, o_e = -1; in main()
130 d_arg = m_arg = s_arg = t_arg = -1; in main()
133 while ((c = getopt(argc, argv, "Bvb:d:e:f:i:m:o:s:t:")) != -1) in main()
157 if (sscanf(optarg, "%02x%02x-%02x%02x", in main()
182 argc -= optind; in main()
189 up = B_flag || d_arg != -1 || m_arg != -1 || o_flag || s_arg != -1 in main()
190 || t_arg != -1; in main()
220 if (d_arg != -1) in main()
224 if (m_arg != -1) { in main()
234 if (s_arg != -1) in main()
235 boot0[OFF_OPT] = s_arg - 1; in main()
238 if (t_arg != -1) in main()
242 if (o_e != -1 && set_bell(boot0, o_e, 0) != -1) in main()
272 * Lookup for a certain code sequence, return -1 if not found.
299 return -1; in set_bell()
314 if ((fd = open(disk, O_RDONLY)) == -1) in read_mbr()
316 if ((n = read(fd, buf, MBRSIZE)) == -1) in read_mbr()
330 if (lseek(fd, 0, SEEK_SET) == -1 || in read_mbr()
331 (n = read(fd, *mbr, mbr_size)) == -1) in read_mbr()
358 if (strcmp(class->lg_name, name) == 0) { in geom_class_available()
382 if (fd != -1) { in write_mbr()
399 if (fd == -1) { in write_mbr()
413 gctl_ro_param(grq, "class", -1, "PART"); in write_mbr()
414 gctl_ro_param(grq, "arg0", -1, pname); in write_mbr()
415 gctl_ro_param(grq, "verb", -1, "bootcode"); in write_mbr()
417 gctl_ro_param(grq, "flags", -1, "C"); in write_mbr()
460 if (!(mbr[OFF_FLAGS] & 1 << (7 - i)) ^ opttbl[i].def) in display_mbr()
466 printf("volume serial ID %02x%02x-%02x%02x\n", in display_mbr()
480 * Return the boot0 version with the minor revision in the low byte, and
481 * the major revision in the next higher byte.
518 static u_int8_t id1[] = {'D', 'r', 'i', 'v', 'e', ' '}; in boot0bs() local
521 {0x1b2, sizeof(id1), id1}, in boot0bs()
524 {0x1ae, sizeof(id1), id1}, in boot0bs()
530 for (; p->off || p->len; p++) { in boot0bs()
531 if (p->len == 0) in boot0bs()
533 if (!memcmp(bs + p->off, p->key, p->len)) /* match */ in boot0bs()
535 while (p->len) /* skip to next block */ in boot0bs()
538 b0_ver = p->off; /* XXX ugly side effect */ in boot0bs()
539 return p->off; in boot0bs()
543 * Adjust "and" and "or" masks for a -o option argument.
561 errx(1, "%s: Unknown -o option", q); in stropt()
564 x = 1 << (7 - i); in stropt()
585 errx(1, "%s: Bad argument to -%c option", arg, opt); in argtoi()
596 "usage: boot0cfg [-Bv] [-b boot0] [-d drive] [-f file] [-m mask]", in usage()
597 " [-o options] [-s slice] [-t ticks] disk"); in usage()