Re: [PATCH] Use glib for getPartitionsList()

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

 



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: pgpNOEuYQ8yFI.pgp
Description: PGP signature

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux