summaryrefslogtreecommitdiffstats
path: root/sbin/gpt/migrate.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2005-08-31 05:40:41 +0000
committermarcel <marcel@FreeBSD.org>2005-08-31 05:40:41 +0000
commit982ab454f00893994acf43df8fc83d4afbe08883 (patch)
tree485d373820a5bf5c83b186654ad37c05e9d40130 /sbin/gpt/migrate.c
parent5fa2cd3d841be4d686d029a18660f1b7b55c69a0 (diff)
downloadFreeBSD-src-982ab454f00893994acf43df8fc83d4afbe08883.zip
FreeBSD-src-982ab454f00893994acf43df8fc83d4afbe08883.tar.gz
o Replace unicode16() by utf8_to_utf16().
o Introduce utf16_to_utf8(). o Add option -l to the show command to display the GPT label instead of the friendly partition type. o Add option -u to the show command to suppress the friendly output and print th raw UUIDs instead.
Diffstat (limited to 'sbin/gpt/migrate.c')
-rw-r--r--sbin/gpt/migrate.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sbin/gpt/migrate.c b/sbin/gpt/migrate.c
index 5322792..fb36d7a 100644
--- a/sbin/gpt/migrate.c
+++ b/sbin/gpt/migrate.c
@@ -100,22 +100,22 @@ migrate_disklabel(int fd, off_t start, struct gpt_ent *ent)
case FS_SWAP: {
uuid_t swap = GPT_ENT_TYPE_FREEBSD_SWAP;
le_uuid_enc(&ent->ent_type, &swap);
- unicode16(ent->ent_name,
- L"FreeBSD swap partition", 36);
+ utf8_to_utf16("FreeBSD swap partition",
+ ent->ent_name, 36);
break;
}
case FS_BSDFFS: {
uuid_t ufs = GPT_ENT_TYPE_FREEBSD_UFS;
le_uuid_enc(&ent->ent_type, &ufs);
- unicode16(ent->ent_name,
- L"FreeBSD UFS partition", 36);
+ utf8_to_utf16("FreeBSD UFS partition",
+ ent->ent_name, 36);
break;
}
case FS_VINUM: {
uuid_t vinum = GPT_ENT_TYPE_FREEBSD_VINUM;
le_uuid_enc(&ent->ent_type, &vinum);
- unicode16(ent->ent_name,
- L"FreeBSD vinum partition", 36);
+ utf8_to_utf16("FreeBSD vinum partition",
+ ent->ent_name, 36);
break;
}
default:
@@ -255,8 +255,8 @@ migrate(int fd)
le_uuid_enc(&ent->ent_type, &freebsd);
ent->ent_lba_start = htole64((uint64_t)start);
ent->ent_lba_end = htole64(start + size - 1LL);
- unicode16(ent->ent_name,
- L"FreeBSD disklabel partition", 36);
+ utf8_to_utf16("FreeBSD disklabel partition",
+ ent->ent_name, 36);
ent++;
} else
ent = migrate_disklabel(fd, start, ent);
@@ -267,7 +267,8 @@ migrate(int fd)
le_uuid_enc(&ent->ent_type, &efi_slice);
ent->ent_lba_start = htole64((uint64_t)start);
ent->ent_lba_end = htole64(start + size - 1LL);
- unicode16(ent->ent_name, L"EFI system partition", 36);
+ utf8_to_utf16("EFI system partition",
+ ent->ent_name, 36);
ent++;
break;
}
OpenPOWER on IntegriCloud