[rhel6-branch] Fix detection of unformatted and LDL DASDs. (#1144979)

Samantha N. Bueno sbueno+anaconda at redhat.com
Tue Mar 3 13:31:59 UTC 2015


On Tue, Mar 03, 2015 at 11:42:38AM +0100, Vratislav Podzimek wrote:
> On Mon, 2015-03-02 at 11:12 -0500, Samantha N. Bueno wrote:
> > The isLdlDasd function was not properly netting all LDL DASDs that were
> > available to a system. This cleans up some unnecessary code in isLdlDasd
> > and makes it a bit simpler by just checking dasd_info.format to see
> > whether it's CDL; anything else we can run dasdfmt on.
> > 
> > Resolves: rhbz#1144979
> > ---
> >  isys/dasd.c  | 38 +++++++-------------------------------
> >  isys/isys.c  |  9 ---------
> >  isys/isys.py |  3 ---
> >  3 files changed, 7 insertions(+), 43 deletions(-)
> > 
> > diff --git a/isys/dasd.c b/isys/dasd.c
> > index 726281a..676bf21 100644
> > --- a/isys/dasd.c
> > +++ b/isys/dasd.c
> > @@ -39,9 +39,8 @@
> >  #include <asm/dasd.h>
> >  #endif
> >  
> > -#if defined(__s390__) || defined(__s390x__)
> >  /* s390 stuff to detect DASDs */
> > -static int read_vlabel(dasd_information_t *dasd_info, int fd, int blksize,
> > +static int read_vlabel(dasd_information2_t *dasd_info, int fd, int blksize,
> >                         volume_label_t *vlabel) {
> Is the dasd_information2_t type available on non-s390(x) platforms?

Well, dasd_information2_t comes from the same header file that
dasd_information_t also came/comes from:
http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/arch/s390/include/asm/dasd.h?id=refs/tags/v2.6.32.65
 
> Other than the little concern above this looks really good to me -- good
> riddance of C code and a hope for some future dasd libblockdev plugin to
> be quite sane.

Thanks -- this is going to be more of a challenge (or perhaps just
different) to work upstream/into libblockdev, but it is still possible.
:)
 
Samantha


More information about the anaconda-patches mailing list