- Cleanup mkpart manpage entry (#1183077)

- doc: Add information about quoting
This commit is contained in:
Brian C. Lane 2016-06-15 17:27:50 -07:00
parent bdb87d14b5
commit 7e779bb347
3 changed files with 104 additions and 1 deletions

View File

@ -0,0 +1,48 @@
From a5a64f34ca3d64c4da04ed6e870d4c8e469c6098 Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Thu, 5 Nov 2015 15:03:54 -0800
Subject: [PATCH 39/40] Cleanup mkpart manpage entry (#1183077)
(cherry picked from commit fa6cd8448f68e6661fb86a8331b44198edd02c9d)
---
doc/C/parted.8 | 8 ++++----
doc/parted.texi | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/C/parted.8 b/doc/C/parted.8
index a45f42f..41baa1a 100644
--- a/doc/C/parted.8
+++ b/doc/C/parted.8
@@ -73,12 +73,12 @@ Create a new disklabel (partition table) of \fIlabel-type\fP. \fIlabel-type\fP
should be one of "aix", "amiga", "bsd", "dvh", "gpt", "loop", "mac", "msdos",
"pc98", or "sun".
.TP
-.B mkpart \fIpart-type\fP \fI[fs-type]\fP \fIstart\fP \fIend\fP
-Make a \fIpart-type\fP partition for filesystem \fIfs-type\fP (if specified),
-beginning at \fIstart\fP and ending at \fIend\fP (by default in megabytes).
+.B mkpart [\fIpart-type\fP \fIname\fP \fIfs-type\fP] \fIstart\fP \fIend\fP
+Create a new partition. \fIpart-type\fP may be specified only with msdos and
+dvh partition tables, it should be one of "primary", "logical", or "extended".
+\fIname\fP is required for GPT partition tables and \fIfs-type\fP is optional.
\fIfs-type\fP can be one of "btrfs", "ext2", "ext3", "ext4", "fat16", "fat32",
"hfs", "hfs+", "linux-swap", "ntfs", "reiserfs", or "xfs".
-\fIpart-type\fP should be one of "primary", "logical", or "extended".
.TP
.B name \fIpartition\fP \fIname\fP
Set the name of \fIpartition\fP to \fIname\fP. This option works only on Mac,
diff --git a/doc/parted.texi b/doc/parted.texi
index 07aa702..c727fb2 100644
--- a/doc/parted.texi
+++ b/doc/parted.texi
@@ -550,7 +550,7 @@ PCs.
@cindex mkpart, command description
@cindex command description, mkpart
-@deffn Command mkpart [@var{part-type} @var{fs-type} @var{name}] @var{start} @var{end}
+@deffn Command mkpart [@var{part-type} @var{name} @var{fs-type}] @var{start} @var{end}
Creates a new partition, @emph{without} creating a new file system on
that partition. This is useful for creating partitions for file systems
--
2.5.5

View File

@ -0,0 +1,49 @@
From fd311a9367ec342b7d1fa5265f4d2167a29de30d Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Fri, 6 Nov 2015 08:56:45 -0800
Subject: [PATCH 40/40] doc: Add information about quoting
Some shells (bash) will strip off the " so it needs to be
wrapped in '' to prevent it. eg.
parted -s ./disk.img mkpart '"EFI System Partition"' 1M 500M
(cherry picked from commit 8d5e7329a6984614ac9951f376bc77ea7f822ca3)
---
doc/C/parted.8 | 4 +++-
doc/parted.texi | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/doc/C/parted.8 b/doc/C/parted.8
index 41baa1a..eb7cd98 100644
--- a/doc/C/parted.8
+++ b/doc/C/parted.8
@@ -82,7 +82,9 @@ dvh partition tables, it should be one of "primary", "logical", or "extended".
.TP
.B name \fIpartition\fP \fIname\fP
Set the name of \fIpartition\fP to \fIname\fP. This option works only on Mac,
-PC98, and GPT disklabels. The name can be placed in quotes, if necessary.
+PC98, and GPT disklabels. The name can be placed in double quotes, if necessary.
+And depending on the shell may need to also be wrapped in single quotes so that
+the shell doesn't strip off the double quotes.
.TP
.B print
Display the partition table.
diff --git a/doc/parted.texi b/doc/parted.texi
index c727fb2..1b9c084 100644
--- a/doc/parted.texi
+++ b/doc/parted.texi
@@ -628,7 +628,9 @@ $ @kbd{mkfs.vfat /dev/sdX2}
@deffn Command name @var{number} @var{name}
Sets the name for the partition @var{number} (GPT, Mac, MIPS and PC98 only).
-The name can be placed in quotes.
+The name can be placed in quotes. And depending on the shell may need to also
+be wrapped in single quotes so that the shell doesn't strip off the double
+quotes.
Example:
--
2.5.5

View File

@ -4,7 +4,7 @@
Summary: The GNU disk partition manipulation program
Name: parted
Version: 3.2
Release: 20%{?dist}
Release: 21%{?dist}
License: GPLv3+
Group: Applications/System
URL: http://www.gnu.org/software/parted
@ -52,6 +52,8 @@ Patch0035: 0035-parted-Display-details-of-partition-alignment-failur.patch
Patch0036: 0036-libparted-Remove-fdasd-geometry-code-from-alloc_meta.patch
Patch0037: 0037-libparted-Fix-probing-AIX-disks-on-other-arches.patch
Patch0038: 0038-partprobe-Open-the-device-once-for-probing.patch
Patch0039: 0039-Cleanup-mkpart-manpage-entry-1183077.patch
Patch0040: 0040-doc-Add-information-about-quoting.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: e2fsprogs-devel
@ -188,6 +190,10 @@ fi
%changelog
* Wed Jun 15 2016 Brian C. Lane <bcl@redhat.com> - 3.2-21
- Cleanup mkpart manpage entry (#1183077)
- doc: Add information about quoting
* Thu May 26 2016 Brian C. Lane <bcl@redhat.com> - 3.2-20
- libparted: Fix probing AIX disks on other arches
- partprobe: Open the device once for probing