mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Victorien Vedrine <victorien.vedrine@ophrys.net>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v3] partitions: dos: Fix support of extended partition type 0x05
Date: Mon, 22 Dec 2014 21:05:23 +0100	[thread overview]
Message-ID: <20141222200523.GB28003@pengutronix.de> (raw)
In-Reply-To: <1419268822-30204-1-git-send-email-victorien.vedrine@ophrys.net>

On Mon, Dec 22, 2014 at 06:20:22PM +0100, Victorien Vedrine wrote:
> From: victorien <victorien.vedrine@ophrys.net>
> 
> Signed-off-by: Victorien Vedrine <victorien.vedrine@ophrys.net>
> ---
>  common/partitions/dos.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/common/partitions/dos.c b/common/partitions/dos.c
> index 37addfd..f02c822 100644
> --- a/common/partitions/dos.c
> +++ b/common/partitions/dos.c
> @@ -205,11 +205,11 @@ static void dos_partition(void *buf, struct block_device *blk,
>  			pd->used_entries++;
>  			/*
>  			 * Partitions of type 0x05 and 0x0f (and some more)
> -			 * contain extended partitions. Only check for type 0x0f
> -			 * here as this is the easiest to parse and common
> -			 * enough.
> +			 * contain extended partitions. Only check for type
> +			 * 0x05 and 0x0f.
the now removed comment implies that partitions of type 0x05 and 0x0f
are to be handled differently. With your change however they are handled
identically. Is this correct? Might be worth to explain in the commit
log.

>  			 */
> -			if (pentry.dos_partition_type == 0x0f) {
> +			if (pentry.dos_partition_type == 0x0f ||
> +				pentry.dos_partition_type == 0x05) {
There are two schools for indention in this case. Either use two tabs
more than the line above, or align the continuation at the opening
brace.

Are you using vim? Then add "filetype indent on" to your .vimrc and
depending on the way you want to handle the above case also add

	set cinoptions=(,:

for aligning with the opening brace, or

	set cinoptions=:

for the two tab preference.

Best regards
Uwe
-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-12-22 20:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-22 17:20 Victorien Vedrine
2014-12-22 20:05 ` Uwe Kleine-König [this message]
2014-12-23 13:23   ` Victorien Vedrine

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=20141222200523.GB28003@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=victorien.vedrine@ophrys.net \
    /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