Re: [rhel5-branch] Sleep if the kickstart file read fails.

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

 



> > --- a/loader2/method.c
> > +++ b/loader2/method.c
> > @@ -644,8 +644,11 @@ int copyFileAndLoopbackMount(int fd, char * dest,
> >        2 - could not mount device as ext2, vfat, or iso9660
> >        3 - file named path not there
> >  */
> > +#define TRYMOUNT(fs) \
> > +    (doPwMount("/tmp/srcdev", "/tmp/mnt", (fs), IMOUNT_RDONLY, NULL))
> > +
> 
> I'm not a really big fan of using a macro for this.  Why not make a helper
> function that iterates a list instead?  That is to say something like:
> 
> static int tryMounts(char *src, char *dest, int flags)
> {
>     char *fstypes[] = {"vfat","ext2","iso9660", NULL};
>     int i, rc;
>     for (i = 0, rc = 1; rc && fstypes[i] != NULL; i++)
>         rc = doPwMount(src, dest, fstypes[i], flags, NULL);
>     return rc;
> }

Agreed - using a macro here is definitely not what I would do.

- Chris

_______________________________________________
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