diff options
author | Chris Lumens <clumens@redhat.com> | 2008-08-25 16:47:35 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-08-26 10:45:54 -0400 |
commit | 26ffc07f2257a98bd291541a1bb3a6a72f6a9371 (patch) | |
tree | 5442a268a868bbb7d3f66084e5ab248c53fe45e8 /isys | |
parent | e03184847fd46f0b52066eef8632234d7b52864d (diff) | |
download | anaconda-26ffc07f2257a98bd291541a1bb3a6a72f6a9371.tar.gz anaconda-26ffc07f2257a98bd291541a1bb3a6a72f6a9371.tar.xz anaconda-26ffc07f2257a98bd291541a1bb3a6a72f6a9371.zip |
Add another mount function that takes a list of fstypes to try.
Diffstat (limited to 'isys')
-rw-r--r-- | isys/imount.c | 19 | ||||
-rw-r--r-- | isys/imount.h | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/isys/imount.c b/isys/imount.c index f789f5be2..9ae5e6d3d 100644 --- a/isys/imount.c +++ b/isys/imount.c @@ -130,6 +130,25 @@ int doPwMount(char *dev, char *where, char *fs, char *options, char **err) { return 0; } +int doMultiMount(char *dev, char *where, char **fstypes, char *options, char **err) { + int retval = 0, i; + + for (i = 0; fstypes[i]; i++) { + /* If we made a previous call to mount and it returned an error message, + * get rid of it now. We only want to preserve the error from the last + * fstype. + */ + if (err && *err) + free(*err); + + retval = doPwMount(dev, where, fstypes[i], options, err); + if (!retval) + return retval; + } + + return retval; +} + int mkdirChain(char * origChain) { char * chain; char * chptr; diff --git a/isys/imount.h b/isys/imount.h index 9f9c4251c..56f6deaf3 100644 --- a/isys/imount.h +++ b/isys/imount.h @@ -30,6 +30,7 @@ #define IMOUNT_REMOUNT 4 int doPwMount(char *dev, char *where, char *fs, char *options, char **err); +int doMultiMount(char *dev, char *where, char **fstypes, char *options, char **err); int mkdirChain(char * origChain); #endif |