diff options
author | Jeremy Katz <katzj@redhat.com> | 2003-04-24 15:46:31 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2003-04-24 15:46:31 +0000 |
commit | 0a562126d84c59a113231ae7ab38984f92d62153 (patch) | |
tree | 5e87b9094f4ebdc328979e3a0640dee5f1fc40cb /loader2/method.c | |
parent | dd200d781bd9012f562399c2ee69c23fe60d86b9 (diff) | |
download | anaconda-0a562126d84c59a113231ae7ab38984f92d62153.tar.gz anaconda-0a562126d84c59a113231ae7ab38984f92d62153.tar.xz anaconda-0a562126d84c59a113231ae7ab38984f92d62153.zip |
another taroon merge. tagged before as before-taroon-merge, after as
after-taroon-merge
this one adds s390 fixes, basic i/p series platform support, support for
multiple kernels and one second stage, cmdline kickstart mode (nice for s390),
some warning cleanups.
Diffstat (limited to 'loader2/method.c')
-rw-r--r-- | loader2/method.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/loader2/method.c b/loader2/method.c index b2a4ecc5f..130d920ca 100644 --- a/loader2/method.c +++ b/loader2/method.c @@ -39,22 +39,7 @@ #include "../isys/imount.h" #include "../isys/isys.h" - -/* JKFIXME: this is a pile of crap... should at least only be done once */ -/* Need to tell loop.h what the actual dev_t type is. */ -#undef dev_t -#if defined(__alpha) || (defined(__sparc__) && defined(__arch64__)) -#define dev_t unsigned int -#else -#if defined(__x86_64__) -#define dev_t unsigned long -#else -#define dev_t unsigned short -#endif -#endif -#include <linux/loop.h> -#undef dev_t -#define dev_t dev_t +#include "devt.h" #include "nfsinstall.h" #include "hdinstall.h" @@ -107,7 +92,7 @@ int mountLoopback(char * fsystem, char * mntpoint, char * device) { devMakeInode(device, filename); loopfd = open(filename, O_RDONLY); if (loopfd == -1) { - logMessage("unable to open loop device", filename); + logMessage("unable to open loop device %s", filename); return LOADER_ERROR; } logMessage("mntloop %s on %s as %s fd is %d", @@ -115,6 +100,7 @@ int mountLoopback(char * fsystem, char * mntpoint, char * device) { if (ioctl(loopfd, LOOP_SET_FD, targfd)) { logMessage("LOOP_SET_FD failed: %s", strerror(errno)); + ioctl(loopfd, LOOP_CLR_FD, 0); close(targfd); close(loopfd); return LOADER_ERROR; @@ -139,9 +125,9 @@ int mountLoopback(char * fsystem, char * mntpoint, char * device) { 0, NULL, NULL, 0)) { if (doPwMount(filename, mntpoint, "cramfs", 1, 0, NULL, NULL, 0)) { - logMessage("failed to mount loop: %s", strerror(errno)); + ioctl(loopfd, LOOP_CLR_FD, 0); return LOADER_ERROR; } } @@ -597,7 +583,7 @@ int copyFileAndLoopbackMount(int fd, char * dest, int flags, rc = copyFileFd(fd, dest); stat(dest, &sb); - logMessage("copied %d bytes to %s (%s)", sb.st_size, dest, + logMessage("copied %lld bytes to %s (%s)", sb.st_size, dest, ((rc) ? " incomplete" : "complete")); if (rc) { |