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

Re: [PATCH] Use glib for getPartitionsList()



On Fri, Sep 24, 2010 at 12:25:00PM -1000, David Cantrell wrote:
> Use glib functions to simplify the getPartitionsList() function in
> loader.  Also use the g_strfreev() and g_strv_length() functions to
> eliminate the need for those equivalent functions in getparts.c.
> ---

A few minor comments:

1. More documentation, the previous code wasi easier to figure out
   especially with the lines dealing with skipping the partition
   (the check for "1" == skip extended partition wasn't obvious)
   Maybe an example of /proc/partitions with an extended partition
   included.

2. g_strsplit_set() max only needs to be 0, not -1

3. check for disk == NULL at top and bail out early.

4. When checking the length of tokens just look for == 4, if there
   aren't 4 then the following code will fail in weird ways.

Looks good other than that.

-- 
Brian C. Lane / Anaconda Team
Port Orchard, WA (PST8PDT)

Attachment: pgpozd2qBFjCs.pgp
Description: PGP signature


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