]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
losetup: remove obsolete #ifdef MAIN
authorKarel Zak <kzak@redhat.com>
Tue, 20 Dec 2011 10:41:24 +0000 (11:41 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 20 Dec 2011 10:41:24 +0000 (11:41 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/Makefile.am
mount/lomount.c

index 01b9567d59355d1e7736df48ae23ad2d0844eb58..71820c6e5715609b963695824841bebfb6a464c3 100644 (file)
@@ -52,7 +52,6 @@ swapon_LDADD = $(ldadd_common)
 
 losetup_SOURCES = lomount.c $(srcs_common) loop.h lomount.h \
                $(top_srcdir)/lib/strutils.c
-losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS)
 
 mount_static_LDADD =
 
@@ -76,7 +75,6 @@ if HAVE_STATIC_LOSETUP
 bin_PROGRAMS += losetup.static
 losetup_static_SOURCES = $(losetup_SOURCES)
 losetup_static_LDFLAGS = $(ldflags_static)
-losetup_static_CPPFLAGS = -DMAIN $(AM_CPPFLAGS)
 endif
 
 
index 2ce30abb0bb31e9e9e39e04ce4346574e30a254e..222178ff9d2b64f2a2dbbeeb038e7c4eb5e41cf4 100644 (file)
@@ -15,6 +15,8 @@
 #include <sys/sysmacros.h>
 #include <inttypes.h>
 #include <dirent.h>
+#include <getopt.h>
+#include <stdarg.h>
 
 #include "loop.h"
 #include "lomount.h"
@@ -448,8 +450,6 @@ find_loopdev_by_backing_file(const char *filename, char **loopdev)
        return devs_n ? 2 : 1;          /* more loopdevs or error */
 }
 
-#ifdef MAIN
-
 static int
 set_capacity(const char *device)
 {
@@ -610,9 +610,6 @@ show_associated_loop_devices(char *filename, unsigned long long offset, int isof
        return 0;
 }
 
-
-#endif /* MAIN */
-
 /* check if the loopfile is already associated with the same given
  * parameters.
  *
@@ -1026,12 +1023,8 @@ find_loopdev_by_backing_file(const char *filename, char **loopdev)
 
 #endif /* !LOOP_SET_FD */
 
-#ifdef MAIN
-
 #ifdef LOOP_SET_FD
 
-#include <getopt.h>
-#include <stdarg.h>
 
 static void
 usage(FILE *out) {
@@ -1263,4 +1256,3 @@ main(int argc, char **argv) {
        return -1;
 }
 #endif /* !LOOP_SET_FD*/
-#endif /* MAIN */