[Parted-maintainers] Parted package S390 problem

Otavio Salvador otavio at debian.org
Mon Oct 10 19:53:11 UTC 2005


Hello folks,

I had to disable current s390 patch from be able in last
upload. Bastian did the need resync with our current code and I did
another after sync the current with current upstream snapshot but then
I noticed some strange things in patch and decided to leave it out.

Bellow I'll comment a little why I did that and ask for help:

 _device_get_sector_size (PedDevice* dev)
 {
        LinuxSpecific*  arch_specific = LINUX_SPECIFIC (dev);
-       int             sector_size = PED_SECTOR_SIZE; /*makes Valgrind happy*/
+       int             sector_size = PED_SECTOR_SIZE;
 
        PED_ASSERT (dev->open_count, return 0);
 
-       if (_get_linux_version() < KERNEL_VERSION (2,3,0))
-               return PED_SECTOR_SIZE;
-       if (ioctl (arch_specific->fd, BLKSSZGET, &sector_size))
-               return PED_SECTOR_SIZE;
-
-       if (sector_size != PED_SECTOR_SIZE) {
-               if (ped_exception_throw (
-                       PED_EXCEPTION_BUG,
-                       PED_EXCEPTION_IGNORE_CANCEL,
-                       _("The sector size on %s is %d bytes.  Parted is known "
-                       "not to work properly with drives with sector sizes "
-                       "other than %d bytes."),
-                       dev->path,
-                       sector_size,
-                       PED_SECTOR_SIZE)
-                               == PED_EXCEPTION_IGNORE)
-                       return sector_size;
-               else
-                       return PED_SECTOR_SIZE;
-       }
-
        return sector_size;
 }

How you can probably notice, the patch change how parted will get the
sector size and for all calls. This sound weird!

Since this is a generic code I think is good to clean up it a bit and
then put it to be applied later. Can someone help with it?

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: otavio at debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://www.freedom.ind.br/otavio
---------------------------------------------
"Microsoft gives you Windows ... Linux gives
 you the whole house."



More information about the Parted-maintainers mailing list