summaryrefslogtreecommitdiffstats
path: root/mount/lomount.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:25:35 +0100
committerKarel Zak2006-12-07 00:25:35 +0100
commit2b6fc908bc368b540845a313c3b8a867c5ad9a42 (patch)
tree6fad48a239bc90515a5dc4084d6e3c3ee1f41e29 /mount/lomount.c
parentImported from util-linux-2.7.1 tarball. (diff)
downloadkernel-qcow2-util-linux-2b6fc908bc368b540845a313c3b8a867c5ad9a42.tar.gz
kernel-qcow2-util-linux-2b6fc908bc368b540845a313c3b8a867c5ad9a42.tar.xz
kernel-qcow2-util-linux-2b6fc908bc368b540845a313c3b8a867c5ad9a42.zip
Imported from util-linux-2.8 tarball.
Diffstat (limited to 'mount/lomount.c')
-rw-r--r--mount/lomount.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/mount/lomount.c b/mount/lomount.c
index a6ad187ae..276ab4e49 100644
--- a/mount/lomount.c
+++ b/mount/lomount.c
@@ -18,13 +18,12 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
-#if defined(__GLIBC__)
-#define _SOCKETBITS_H
-#endif /* __GLIBC */
-#include "sundries.h" /* for xstrdup */
#include "loop.h"
#include "lomount.h"
+char *xstrdup (const char *s); /* not: #include "sundries.h" */
+void error (const char *fmt, ...); /* idem */
+
#ifdef LOOP_SET_FD
struct crypt_type_struct {
int id;
@@ -137,17 +136,17 @@ find_unused_loop_device (void)
if (loop_known == 1)
error(
"mount: Could not find any loop device.\n"
-" Maybe /dev/loop# has a wrong major number?\n");
+" Maybe /dev/loop# has a wrong major number?");
else if (loop_known == -1)
error(
"mount: Could not find any loop device, and, according to %s,\n"
" this kernel does not know about the loop device.\n"
-" (If so, then recompile or `insmod loop.o'.)\n", PROC_DEVICES);
+" (If so, then recompile or `insmod loop.o'.)", PROC_DEVICES);
else
error(
"mount: Could not find any loop device. Maybe this kernel does not know\n"
" about the loop device (then recompile or `insmod loop.o'), or\n"
-" maybe /dev/loop# has the wrong major number?\n");
+" maybe /dev/loop# has the wrong major number?");
} else
error("mount: could not find any free loop device");
return 0;
@@ -180,7 +179,7 @@ set_loop (const char *device, const char *file, int offset,
loopinfo.lo_name[LO_NAME_SIZE - 1] = 0;
if (encryption && (loopinfo.lo_encrypt_type = crypt_type (encryption))
< 0) {
- fprintf (stderr, "Unsupported encryption type %s", encryption);
+ fprintf (stderr, "Unsupported encryption type %s\n", encryption);
return 1;
}
loopinfo.lo_offset = offset;