From patchwork Tue Jul 17 10:51:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 1204621 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7410DDF25A for ; Tue, 17 Jul 2012 10:52:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753629Ab2GQKwI (ORCPT ); Tue, 17 Jul 2012 06:52:08 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34289 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752358Ab2GQKwH (ORCPT ); Tue, 17 Jul 2012 06:52:07 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 0F733A38EA; Tue, 17 Jul 2012 12:52:06 +0200 (CEST) Received: by ds.suse.cz (Postfix, from userid 10065) id 784847482A; Tue, 17 Jul 2012 12:52:05 +0200 (CEST) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: chris.mason@fusionio.com, David Sterba Subject: [PATCH] btrfs-progs: sort devices by id in fi show Date: Tue, 17 Jul 2012 12:51:59 +0200 Message-Id: <1342522319-26017-1-git-send-email-dsterba@suse.cz> X-Mailer: git-send-email 1.7.6.233.gd79bc Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Devids are printed in descending order now, switch it to ascending. Signed-off-by: David Sterba --- btrfs-show.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/btrfs-show.c b/btrfs-show.c index 8210fd2..2a85932 100644 --- a/btrfs-show.c +++ b/btrfs-show.c @@ -77,7 +77,7 @@ static void print_one_uuid(struct btrfs_fs_devices *fs_devices) free(super_bytes_used); - list_for_each(cur, &fs_devices->devices) { + list_for_each_prev(cur, &fs_devices->devices) { char *total_bytes; char *bytes_used; device = list_entry(cur, struct btrfs_device, dev_list);