[PATCH 0/7] sfdisk improvements

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

 



Hi all,


First two patches are just minor fixes unrelated to the rest.


Third one makes sfdisk not to issue a fatal warning (overridable, though),
if the partition does not start/end on the cylinder boundary and
the unit specified is other than cylinders. These days,
we shouldn't care about the CHS that much IMO...


The last 4 sfdisk patches are followup to
http://www.spinics.net/lists/util-linux-ng/msg04760.html
http://www.spinics.net/lists/util-linux-ng/msg04761.html

The goal these patches is to use 64 bit integer types in sfdisk to
represent the sector numbers. This makes it easy to check if the numbers
overflew the DOS pt limit, which is 2^32. I also tried to detect the overflow
right at the moment when it happens (like Karel suggested), but this turned out
to be ugly.

I decided to use unsigned long long to represent the 64-bit integers,
which might not be the best choice (maybe we should use off_t or uint64_t
instead??). Comments are welcomed.

Thanks,


Petr Uzel (7):
  sfdisk: file descriptor is of int type
  sfdisk: fix weird indentation in msdos_partition()
  sfdisk: make the cylinder boundary check less fatal
  sfdisk: get_disksize() returns long long
  sfdisk: introduce get_ull() function
  sfdisk: use unsigned long long to internally represent sector number
  sfdisk: warn if partition exceeds partition table limits

 fdisk/sfdisk.c |  165 +++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 121 insertions(+), 44 deletions(-)

-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux