| OLD | NEW |
| 1 /*- | 1 /*- |
| 2 * Copyright (c) 2002 Marcel Moolenaar | 2 * Copyright (c) 2002 Marcel Moolenaar |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 176 |
| 177 /* Show the uuid of each partition. */ | 177 /* Show the uuid of each partition. */ |
| 178 { | 178 { |
| 179 char *s; | 179 char *s; |
| 180 uuid_to_string(&ent->ent_uuid, &s, NULL); | 180 uuid_to_string(&ent->ent_uuid, &s, NULL); |
| 181 printf(" (ID: %s)", s); | 181 printf(" (ID: %s)", s); |
| 182 free(s); | 182 free(s); |
| 183 } | 183 } |
| 184 break; | 184 break; |
| 185 case MAP_TYPE_PMBR: | 185 case MAP_TYPE_PMBR: |
| 186 » » » printf("PMBR"); | 186 » » » mbr = m->map_data; |
| 187 if (le16toh(mbr->magic_number) == MBR_MAGIC) |
| 188 { |
| 189 char *s; |
| 190 uuid_to_string(&mbr->boot_guid, &s, NULL); |
| 191 printf("PMBR (Boot GUID: %s)", s); |
| 192 free(s); |
| 193 } |
| 194 else |
| 195 { |
| 196 printf("PMBR (no magic)"); |
| 197 } |
| 187 break; | 198 break; |
| 188 } | 199 } |
| 189 putchar('\n'); | 200 putchar('\n'); |
| 190 m = m->map_next; | 201 m = m->map_next; |
| 191 } | 202 } |
| 192 } | 203 } |
| 193 | 204 |
| 194 int | 205 int |
| 195 cmd_show(int argc, char *argv[]) | 206 cmd_show(int argc, char *argv[]) |
| 196 { | 207 { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 219 continue; | 230 continue; |
| 220 } | 231 } |
| 221 | 232 |
| 222 show(fd); | 233 show(fd); |
| 223 | 234 |
| 224 gpt_close(fd); | 235 gpt_close(fd); |
| 225 } | 236 } |
| 226 | 237 |
| 227 return (0); | 238 return (0); |
| 228 } | 239 } |
| OLD | NEW |