Re: [PATCH 1/5] fdisk: make grain global variable part of fdisk_context()

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

 



On Thu, Jul 26, 2012 at 04:04:24PM +0200, Petr Uzel wrote:
> There is no reason for this to be global variable - it belongs
> to the context.

 Yes. Applied, thanks.

> diff --git a/fdisks/utils.c b/fdisks/utils.c
> index 19aed87..9b69de3 100644
> --- a/fdisks/utils.c
> +++ b/fdisks/utils.c
> @@ -488,6 +488,8 @@ struct fdisk_context *fdisk_new_context_from_filename(const char *fname, int rea
>  	__discover_topology(cxt);
>  	__discover_system_geometry(cxt);
>  
> +	cxt->grain = DEFAULT_SECTOR_SIZE;
> +

 This is unnecessary now, we call update_sector_offset() here. IMHO this
 function should be modified to contains non-DOS stuff only and
 renamed to update_alignment_info().

 But it would be nice to add label specific update_alignment() to
 fdisk_label struct. For DOS compatible mode we can set sector_offset
 and grain there.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
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