GNU bug report logs - #29503
parted name fails on names with spaces

Previous Next

Package: parted;

Reported by: Nathan Craike <ncraike <at> gmail.com>

Date: Thu, 30 Nov 2017 02:26:02 UTC

Severity: normal

To reply to this bug, email your comments to 29503 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#29503; Package parted. (Thu, 30 Nov 2017 02:26:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nathan Craike <ncraike <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Thu, 30 Nov 2017 02:26:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nathan Craike <ncraike <at> gmail.com>
To: bug-parted <at> gnu.org
Subject: parted name fails on names with spaces
Date: Thu, 30 Nov 2017 12:08:04 +1000
Hi,

I'm using GNU parted 3.2 running on Ubuntu 16.04.3 LTS. The machine is
an Amazon EC2 instance (ie a virtual server) launched from Ubuntu's
official 16.04 Amazon machine image (AMI).

I'm trying to use parted to add a name to a disk partition. I'm not
sure if it's of note, but this is a virtual disk attached to my EC2
instance (an "EBS volume" in Amazon terms). The disk in question is
device "/dev/xvdb". I've already created the partition with:

parted /dev/xvdb mklabel gpt
parted /dev/xvdb mkpart primary ext4 0% 100% --align=optimal
mkfs.ext4 -L 'Some other label' /dev/xvdb1

At this stage, "parted /dev/xvdb print" outputs:

parted /dev/xvdb print
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvdb: 5369MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  5368MB  5367MB  ext4         primary

If I then try to add to partition 1 a name which contains spaces using
quotes, parted either prints its usage message or interactively
prompts for the partition number and name. However, in either case
parted seems to have applied the first word name given. Examples:

------------------------------------------------------

$ sudo parted /dev/xvdb name 1 'Secret Documents'
Usage: parted [OPTION]... [DEVICE [COMMAND [PARAMETERS]...]...]
Apply COMMANDs with PARAMETERS to DEVICE.  If no COMMAND(s) are given, run in
interactive mode.

OPTIONs:
---x--- (more of the usage message removed)
  version                                  display the version number
and copyright information of GNU Parted

Report bugs to bug-parted <at> gnu.org

$ sudo parted /dev/xvdb print
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvdb: 5369MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name    Flags
 1      1049kB  5368MB  5367MB  ext4         Secret

------------------------------------------------------

$ sudo parted /dev/xvdb name 1 'My Name'
Partition number? ^C
Error: Expecting a partition number.

$ sudo parted /dev/xvdb print
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvdb: 5369MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  5368MB  5367MB  ext4         My

------------------------------------------------------

The first example is the same as that given in the documentation at
https://www.gnu.org/software/parted/manual/html_node/name.html

Apologies if I'm misunderstanding the documentation, if this is a
known bug, or if this is something introduced upstream.

Regards,
Nathan Craike




This bug report was last modified 7 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.