Re: [Grubby - PATCH 1/4] Add forward declarations for functions

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

 



On 06/11/2012 12:29 PM, Adrian Perez wrote:
> Certain compilers may spit out a huge amount of warnings about
> missing prototypes, or even fail to compile grubby.c if they
> default to the C99 standard. This adds the missing prototypes
> at the beginning of the source file, also marking the functions
> as static -- they are not going to be used anywhere else after
> all.

What compiler does this?  I'd like the changelog to have /specific/
details if we're making changes to deal with compiler issues.

> ---
>  grubby.c |   89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 89 insertions(+)
> 
> diff --git a/grubby.c b/grubby.c
> index fe8317d..71edce7 100644
> --- a/grubby.c
> +++ b/grubby.c
> @@ -124,11 +124,100 @@ struct keywordTypes {
>  };
>  
>  struct configFileInfo;
> +struct grubConfig;
>  
>  typedef const char *(*findConfigFunc)(struct configFileInfo *);
>  typedef const int (*writeLineFunc)(struct configFileInfo *,
>  				struct singleLine *line);
>  
> +static const char *grubFindConfig(struct configFileInfo *cfi);
> +static const char *grub2FindConfig(struct configFileInfo *cfi);
> +static char *grub2ExtractTitle(struct singleLine * line);
> +static int argMatch(const char * one, const char * two);
> +static int sizeOfSingleLine(struct singleLine * line);
> +static void removeLine(struct singleEntry * entry, struct singleLine * line);
> +static void printEntry(struct singleEntry * entry);
> +static void notSuitablePrintf(struct singleEntry * entry, const char *fmt, ...);
> +static char * findBootPrefix(void);
> +
> +static int suitableImage(struct singleEntry * entry,
> +                         const char * bootPrefix,
> +                         int skipRemoved,
> +                         int flags);
> +
> +static void markRemovedImage(struct grubConfig * cfg,
> +                             const char * image,
> +                             const char * prefix);
> +
> +static void setFallbackImage(struct grubConfig * config,
> +                             int hasNew);
> +
> +static void setDefaultImage(struct grubConfig * config,
> +                            int hasNew,
> +                            const char * defaultKernelPath,
> +                            int newIsDefault,
> +                            const char * prefix,
> +                            int flags);
> +
> +static int updateActualImage(struct grubConfig * cfg,
> +                             const char * image,
> +                             const char * prefix,
> +                             const char * addArgs,
> +                             const char * removeArgs,
> +                             int multibootArgs);
> +
> +static int updateImage(struct grubConfig * cfg,
> +                       const char * image,
> +                       const char * prefix,
> +                       const char * addArgs,
> +                       const char * removeArgs,
> +                       const char * addMBArgs,
> +                       const char * removeMBArgs);
> +
> +static int updateInitrd(struct grubConfig * cfg,
> +                        const char * image,
> +                        const char * prefix,
> +                        const char * initrd);
> +
> +static struct singleEntry * findTemplate(struct grubConfig * cfg,
> +                                         const char * prefix,
> +                                         int * indexPtr,
> +                                         int skipRemoved,
> +                                         int flags);
> +
> +static int addNewKernel(struct grubConfig * config,
> +                        struct singleEntry * template,
> +                        const char * prefix,
> +                        char * newKernelPath,
> +                        char * newKernelTitle,
> +                        char * newKernelArgs,
> +                        char * newKernelInitrd,
> +                        char ** extraInitrds,
> +                        int extraInitrdCount,
> +                        char * newMBKernel,
> +                        char * newMBKernelArgs);
> +
> +static int checkDeviceBootloader(const char * device,
> +                                 const unsigned char * boot);
> +
> +static int checkForLilo(struct grubConfig * config);
> +static int checkForGrub(struct grubConfig * config);
> +static int checkForGrub2(struct grubConfig * config);
> +static int checkLiloOnRaid(char * mdDev,
> +                           const unsigned char * boot);
> +
> +static void displayEntry(struct singleEntry * entry,
> +                         const char * prefix,
> +                         int index);
> +
> +static int displayInfo(struct grubConfig * config,
> +                       char * kernel,
> +                       const char * prefix);
> +
> +static void dumpSysconfigGrub(void);
> +static int parseSysconfigGrub(int * lbaPtr,
> +                              char ** bootPtr);
> +
>  struct configFileInfo {
>      char * defaultConfig;
>      findConfigFunc findConfig;


-- 
        Peter

Computer games don't affect kids; I mean if Pac-Man affected us as
kids, we'd all be running around in darkened rooms, munching magic
pills and listening to repetitive electronic music.
		-- Not actually Kristian Wilson, Nintendo, Inc, 1989

01234567890123456789012345678901234567890123456789012345678901234567890123456789

_______________________________________________
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