Util-Linux package development
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Sassan Panahinejad <sassan@sassan.me.uk>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH 1/3] libfdisk: Add support for altering GPT size
Date: Wed, 11 May 2016 12:39:56 -0400	[thread overview]
Message-ID: <20160511163956.GO26300@vapier.lan> (raw)
In-Reply-To: <1462978458-13908-1-git-send-email-sassan@sassan.me.uk>

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

On 11 May 2016 15:54, Sassan Panahinejad wrote:
> This is useful in two situations:
> 
> 1. More than 128 partitions are required. Or
> 
> 2. The partition table must be restricted in size, such as when a system
> expects to find a bootloader at a location that would otherwise overlap the
> partition table.
> 
> The gdisk partitioner supports this feature.
> 
> libfdisk is already capable of reading and writing partition tables of any
> size, but previously could only create ones of 128 entries and could not
> resize.
> 
> This change should be fairly safe, as it has no effect unless explicitly
> activated.

i'm not super familiar with the codebase, but these look pretty nice.  thanks!

> +	fdisk_info(cxt, _("Partition table length changed from %u to %u."), old, new);

old & new are unsigned long, so you'll want %lu

> +int fdisk_set_disklabel_length(struct fdisk_context *cxt, unsigned long entries)
> +{
> +	if (!cxt || !cxt->label)
> +		return -EINVAL;
> +	if (!cxt->label->op->set_length)
> +		return -ENOSYS;
> +
> +	DBG(CXT, ul_debugobj(cxt, "setting %s label length", cxt->label->name));

want to include |entries| in the debug output too ?
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-05-11 16:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 14:54 [PATCH 1/3] libfdisk: Add support for altering GPT size Sassan Panahinejad
2016-05-11 14:54 ` [PATCH 2/3] fdisk: " Sassan Panahinejad
2016-05-11 14:54 ` [PATCH 3/3] sfdisk: " Sassan Panahinejad
2016-05-11 16:39 ` Mike Frysinger [this message]
2016-05-11 20:12   ` [PATCH 1/3] libfdisk: " Sassan Panahinejad
2016-05-12  9:43 ` Karel Zak
2016-05-12  9:54   ` Sassan Panahinejad
2016-05-13 10:44   ` Sassan Panahinejad
2016-05-13 13:48     ` Karel Zak
2016-05-13 13:49       ` Sassan Panahinejad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160511163956.GO26300@vapier.lan \
    --to=vapier@gentoo.org \
    --cc=sassan@sassan.me.uk \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox