[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH parted 3/3] linux: Remove PED_DEVICE_FILE check from _device_

From: Jim Meyering
Subject: Re: [PATCH parted 3/3] linux: Remove PED_DEVICE_FILE check from _device_set_sector_size
Date: Fri, 29 Jan 2010 10:31:13 +0100

Hans de Goede wrote:
> _device_set_sector_size never get called for devices with a type of
> PED_DEVICE_FILE, and having a PED_DEVICE_FILE check inside an ifdef
> __390__ block does not make sense.
> * libparted/arch/linux.c(_device_set_sector_size): Remove

That disjunct is indeed unnecessary.  I added it in

    dasd: allow the use of a *regular* backing file

thinking that it'd be required when running "make check" on an s390,
since many of those tests use a regular file as backing storage.

However, note that testing for PED_DEVICE_FILE inside s390-specific
code does make sense and is currently required in dasd.c, so I propose
to remove the "and having... does not make sense" part of your log

>From 222ebd75668c2a08349df81e0794fbb52cdf8c9d Mon Sep 17 00:00:00 2001
From: Hans de Goede <address@hidden>
Date: Mon, 11 Jan 2010 11:59:27 +0100
Subject: [PATCH] linux: remove PED_DEVICE_FILE check from 

_device_set_sector_size is never called for devices with a type of
* libparted/arch/linux.c (_device_set_sector_size): Remove
 libparted/arch/linux.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index b14c9ca..f3b54f0 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -674,8 +674,7 @@ _device_set_sector_size (PedDevice* dev)

 #if defined __s390__ || defined __s390x__
         /* Return PED_SECTOR_SIZE_DEFAULT for DASDs. */
-        if (dev->type == PED_DEVICE_DASD
-            || dev->type == PED_DEVICE_FILE) {
+        if (dev->type == PED_DEVICE_DASD) {
                 arch_specific->real_sector_size = dev->sector_size;
                 dev->sector_size = PED_SECTOR_SIZE_DEFAULT;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]