Lines Matching defs:bootblock
2 /* This utility makes a bootblock suitable for the SRM console/miniloader */
7 * Where <device> is the name of the device to install the bootblock on,
8 * and <lxboot> is the name of a bootblock to merge in. This bootblock
81 } bootblock;
88 bootblock bootblock_from_disk;
89 bootblock bootloader_image;
116 nread = read(fd, &bootloader_image, sizeof(bootblock));
117 if(nread != sizeof(bootblock)) {
119 fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread);
123 /* Read in the bootblock from disk. */
124 nread = read(dev, &bootblock_from_disk, sizeof(bootblock));
125 if(nread != sizeof(bootblock)) {
126 perror("bootblock read");
127 fprintf(stderr, "expected %zd, got %d\n", sizeof(bootblock), nread);
131 /* Swap the bootblock's disklabel into the bootloader */
134 /* Calculate the bootblock checksum */
143 if(write(dev, &bootloader_image, sizeof(bootblock)) != sizeof(bootblock)) {
144 perror("bootblock write");