diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-01-29 12:16:42 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-01-29 12:16:42 +0000 |
commit | 550458f417c7c3d0c9d97bda2a25d52f302fed39 (patch) | |
tree | 7a7de4c0f5959c712f7ad9a2cdafa81cf8f5e01d /sbin | |
parent | d501876bc68b13c2fdd98d5ee6b4cdff69691eb8 (diff) |
Conform to Apple Mac OS X's behaviour of not giving 'Apple_Free'
partitions a name. Nuke kFreeName.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pdisk/partition_map.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sbin/pdisk/partition_map.c b/sbin/pdisk/partition_map.c index aee9c348670..d4aafc0ec54 100644 --- a/sbin/pdisk/partition_map.c +++ b/sbin/pdisk/partition_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: partition_map.c,v 1.80 2016/01/28 22:09:56 krw Exp $ */ +/* $OpenBSD: partition_map.c,v 1.81 2016/01/29 12:16:41 krw Exp $ */ /* * partition_map.c - partition map routines @@ -47,8 +47,6 @@ const char *kMapType = "Apple_partition_map"; const char *kUnixType = "OpenBSD"; const char *kHFSType = "Apple_HFS"; -const char *kFreeName = "Extra"; - enum add_action { kReplace = 0, kAdd = 1, @@ -323,8 +321,6 @@ create_partition_map(int fd, char *name, u_int64_t mediasz, uint32_t sectorsz) dpme->dpme_map_entries = 1; dpme->dpme_pblock_start = 1; dpme->dpme_pblocks = map->media_size - 1; - strlcpy(dpme->dpme_name, kFreeName, - sizeof(dpme->dpme_name)); strlcpy(dpme->dpme_type, kFreeType, sizeof(dpme->dpme_type)); dpme->dpme_lblock_start = 0; @@ -445,8 +441,7 @@ add_partition_to_map(const char *name, const char *dptype, uint32_t base, if (add_data_to_map(dpme, cur->disk_address, map) == 0) { free(dpme); } else if (act == kSplit) { - dpme = create_dpme(kFreeName, kFreeType, new_base, - new_length); + dpme = create_dpme("", kFreeType, new_base, new_length); if (dpme != NULL) { /* * insert new with block address equal to @@ -536,7 +531,6 @@ delete_partition_from_map(struct partition_map *entry) dpme = entry->dpme; memset(dpme->dpme_name, 0, sizeof(dpme->dpme_name)); - strlcpy(dpme->dpme_name, kFreeName, sizeof(dpme->dpme_name)); memset(dpme->dpme_type, 0, sizeof(dpme->dpme_type)); strlcpy(dpme->dpme_type, kFreeType, sizeof(dpme->dpme_type)); dpme_init_flags(dpme); |