diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-01-26 16:13:10 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-01-26 16:13:10 +0000 |
commit | 3e7b394ce9e7879ec16e72df11e27a88159c2da6 (patch) | |
tree | 57bd0a8d807be4726da840a610da41f972fab98b /sbin | |
parent | 6ad4b45c3bbd0b335877773a3f0824944628605a (diff) |
Whitespace, line wrapping fixes.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pdisk/dump.c | 32 | ||||
-rw-r--r-- | sbin/pdisk/file_media.c | 5 | ||||
-rw-r--r-- | sbin/pdisk/partition_map.c | 15 | ||||
-rw-r--r-- | sbin/pdisk/validate.c | 10 |
4 files changed, 31 insertions, 31 deletions
diff --git a/sbin/pdisk/dump.c b/sbin/pdisk/dump.c index 1b5ee4d4585..d31ae34c6ab 100644 --- a/sbin/pdisk/dump.c +++ b/sbin/pdisk/dump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dump.c,v 1.53 2016/01/25 23:43:20 krw Exp $ */ +/* $OpenBSD: dump.c,v 1.54 2016/01/26 16:13:09 krw Exp $ */ /* * dump.c - dumping partition maps @@ -104,10 +104,8 @@ dump_partition_map(struct partition_map_header *map) if (max_name_length < 6) { max_name_length = 6; } - printf(" #: %*s %-*s %*s %-*s ( size )\n", - max_type_length, "type", - max_name_length, "name", - digits, "length", digits, "base"); + printf(" #: %*s %-*s %*s %-*s ( size )\n", max_type_length, "type", + max_name_length, "name", digits, "length", digits, "base"); for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) { @@ -177,8 +175,8 @@ show_data_structures(struct partition_map_header *map) printf("Header:\n"); printf("map %d blocks out of %d, media %lu blocks (%d byte blocks)\n", - map->blocks_in_map, map->maximum_in_map, - map->media_size, map->logical_block); + map->blocks_in_map, map->maximum_in_map, map->media_size, + map->logical_block); printf("Map is%s writable", rflag ? " not" : ""); printf(" and has%s been changed\n", (map->changed) ? "" : " not"); printf("\n"); @@ -200,7 +198,7 @@ show_data_structures(struct partition_map_header *map) printf("No drivers\n"); } else { printf("%u driver%s-\n", zp->sbDrvrCount, - (zp->sbDrvrCount > 1) ? "s" : ""); + (zp->sbDrvrCount > 1) ? "s" : ""); m = zp->sbDDMap; for (i = 0; i < zp->sbDrvrCount; i++) { printf("%u: @ %u for %u, type=0x%x\n", i + 1, @@ -213,8 +211,7 @@ show_data_structures(struct partition_map_header *map) for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) { p = entry->dpme; - printf("%2ld: %20.32s ", - entry->disk_address, p->dpme_type); + printf("%2ld: %20.32s ", entry->disk_address, p->dpme_type); printf("%7u @ %-7u ", p->dpme_pblocks, p->dpme_pblock_start); printf("%c%c%c%c%c%c%c%c%c ", (p->dpme_flags & DPME_VALID) ? 'V' : '.', @@ -235,7 +232,7 @@ show_data_structures(struct partition_map_header *map) } printf("\n"); printf(" #: booter bytes load_address " - "goto_address checksum processor\n"); + "goto_address checksum processor\n"); for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) { p = entry->dpme; @@ -300,17 +297,19 @@ full_dump_partition_entry(struct partition_map_header *map, int ix) printf(" name: '%.32s'\n", p->dpme_name); printf(" type: '%.32s'\n", p->dpme_type); - printf(" boot start block: %10u\n", p->dpme_boot_block); printf("boot length (in bytes): %10u\n", p->dpme_boot_bytes); printf(" load address: 0x%08x\n", p->dpme_load_addr); printf(" start address: 0x%08x\n", p->dpme_goto_addr); printf(" checksum: 0x%08x\n", p->dpme_checksum); printf(" processor: '%.32s'\n", p->dpme_processor_id); - printf("dpme_reserved_3 -"); + printf("dpme_reserved_1 -"); dump_block(p->dpme_reserved_1, sizeof(p->dpme_reserved_1)); + printf("dpme_reserved_2 -"); dump_block(p->dpme_reserved_2, sizeof(p->dpme_reserved_2)); + printf("dpme_reserved_3 -"); dump_block(p->dpme_reserved_3, sizeof(p->dpme_reserved_3)); + printf("dpme_reserved_4 -"); dump_block(p->dpme_reserved_4, sizeof(p->dpme_reserved_4)); } @@ -397,7 +396,8 @@ get_max_type_string_length(struct partition_map_header *map) max = 0; - for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) { + for (entry = map->disk_order; entry != NULL; + entry = entry->next_on_disk) { length = strnlen(entry->dpme->dpme_type, DPISTRLEN); if (length > max) { max = length; @@ -415,8 +415,8 @@ get_max_name_string_length(struct partition_map_header *map) max = 0; - for (entry = map->disk_order; entry != NULL; entry = - entry->next_on_disk) { + for (entry = map->disk_order; entry != NULL; + entry = entry->next_on_disk) { length = strnlen(entry->dpme->dpme_name, DPISTRLEN); if (length > max) { max = length; diff --git a/sbin/pdisk/file_media.c b/sbin/pdisk/file_media.c index 97e37ddda80..99c57db322c 100644 --- a/sbin/pdisk/file_media.c +++ b/sbin/pdisk/file_media.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file_media.c,v 1.41 2016/01/25 23:43:20 krw Exp $ */ +/* $OpenBSD: file_media.c,v 1.42 2016/01/26 16:13:09 krw Exp $ */ /* * file_media.c - @@ -155,7 +155,8 @@ read_block0(int fd, struct block0 *block0) sizeof(ddmap_ondisk)); memcpy(&block0->sbDDMap[i].ddBlock, &ddmap_ondisk.ddBlock, sizeof(block0->sbDDMap[i].ddBlock)); - block0->sbDDMap[i].ddBlock = betoh32(block0->sbDDMap[i].ddBlock); + block0->sbDDMap[i].ddBlock = + betoh32(block0->sbDDMap[i].ddBlock); memcpy(&block0->sbDDMap[i].ddSize, &ddmap_ondisk.ddSize, sizeof(block0->sbDDMap[i].ddSize)); block0->sbDDMap[i].ddSize = betoh16(block0->sbDDMap[i].ddSize); diff --git a/sbin/pdisk/partition_map.c b/sbin/pdisk/partition_map.c index b79e7ce2941..d0384b1caea 100644 --- a/sbin/pdisk/partition_map.c +++ b/sbin/pdisk/partition_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: partition_map.c,v 1.65 2016/01/26 02:38:05 krw Exp $ */ +/* $OpenBSD: partition_map.c,v 1.66 2016/01/26 16:13:09 krw Exp $ */ /* * partition_map.c - partition map routines @@ -350,8 +350,8 @@ add_partition_to_map(const char *name, const char *dptype, uint32_t base, kFreeType, DPISTRLEN) == 0) && base >= cur->dpme->dpme_pblock_start) { cur->dpme->dpme_pblocks = - map->media_size - - cur->dpme->dpme_pblock_start; + map->media_size - + cur->dpme->dpme_pblock_start; break; } /* create an extra free partition */ @@ -548,7 +548,7 @@ delete_partition_from_map(struct partition_map *entry) entry->dpme->dpme_pblock_start; } dpme = create_dpme(kFreeName, kFreeType, - entry->dpme->dpme_pblock_start, entry->dpme->dpme_pblocks); + entry->dpme->dpme_pblock_start, entry->dpme->dpme_pblocks); if (dpme == NULL) { return; } @@ -615,8 +615,7 @@ combine_entry(struct partition_map *entry) 0) { /* next is not free */ } else if (entry->dpme->dpme_pblock_start + - entry->dpme->dpme_pblocks != - p->dpme->dpme_pblock_start) { + entry->dpme->dpme_pblocks != p->dpme->dpme_pblock_start) { /* next is not contiguous (XXX this is bad) */ printf("next entry is not contiguous\n"); /* start is already minimum */ @@ -641,8 +640,8 @@ combine_entry(struct partition_map *entry) if (strncasecmp(p->dpme->dpme_type, kFreeType, DPISTRLEN) != 0) { /* previous is not free */ - } else if (p->dpme->dpme_pblock_start + p->dpme->dpme_pblocks - != entry->dpme->dpme_pblock_start) { + } else if (p->dpme->dpme_pblock_start + p->dpme->dpme_pblocks != + entry->dpme->dpme_pblock_start) { /* previous is not contiguous (XXX this is bad) */ printf("previous entry is not contiguous\n"); /* new end is maximum of two ends */ diff --git a/sbin/pdisk/validate.c b/sbin/pdisk/validate.c index 79d09b906b7..d3349b36756 100644 --- a/sbin/pdisk/validate.c +++ b/sbin/pdisk/validate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: validate.c,v 1.39 2016/01/25 21:51:23 krw Exp $ */ +/* $OpenBSD: validate.c,v 1.40 2016/01/26 16:13:09 krw Exp $ */ /* * validate.c - @@ -59,7 +59,8 @@ void print_range_list(struct range_list *); void coalesce_list(struct range_list *); struct range_list * -new_range_list_item(enum range_state state, int valid, uint32_t low, uint32_t high) +new_range_list_item(enum range_state state, int valid, uint32_t low, + uint32_t high) { struct range_list *item; @@ -120,7 +121,6 @@ add_range(struct range_list **list, uint32_t base, uint32_t len, int allocate) } cur->prev = item; item->next = cur; - cur->start = low; } if (high < cur->end) { @@ -168,8 +168,8 @@ coalesce_list(struct range_list *list) if (item == 0) { break; } - if (cur->valid == item->valid - && cur->state == item->state) { + if (cur->valid == item->valid && + cur->state == item->state) { cur->end = item->end; cur->next = item->next; if (item->next != 0) { |