From: Karel Zak Date: Tue, 20 Dec 2011 11:13:06 +0000 (+0100) Subject: losetup: remove #ifdef LOOP_SET_FD nonsense X-Git-Tag: v2.21-rc1~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6541e717d9ca4f58e2398a2c7132e5766e6def90;p=thirdparty%2Futil-linux.git losetup: remove #ifdef LOOP_SET_FD nonsense It's build-system task to enable/disable utils according to accessible system features. Signed-off-by: Karel Zak --- diff --git a/mount/lomount.c b/mount/lomount.c index 222178ff9d..278c61c380 100644 --- a/mount/lomount.c +++ b/mount/lomount.c @@ -25,8 +25,6 @@ #include "sundries.h" #include "pathnames.h" -#ifdef LOOP_SET_FD - static int is_associated(int dev, struct stat *file, unsigned long long offset, int isoff); static int @@ -986,46 +984,6 @@ error: return 1; } -#else /* no LOOP_SET_FD defined */ -static void -mutter(void) { - fprintf(stderr, - _("This mount was compiled without loop support. " - "Please recompile.\n")); -} - -int -set_loop(const char *device, const char *file, unsigned long long offset, - unsigned long long sizelimit, const char *encryption, int pfd, int *loopro, - int keysz, int hash_pass) { - mutter(); - return 1; -} - -int -del_loop (const char *device) { - mutter(); - return 1; -} - -char * -find_unused_loop_device (void) { - mutter(); - return 0; -} - -int -find_loopdev_by_backing_file(const char *filename, char **loopdev) -{ - mutter(); - return 1; -} - -#endif /* !LOOP_SET_FD */ - -#ifdef LOOP_SET_FD - - static void usage(FILE *out) { @@ -1246,13 +1204,3 @@ main(int argc, char **argv) { return res; } -#else /* LOOP_SET_FD not defined */ - -int -main(int argc, char **argv) { - fprintf(stderr, - _("No loop support was available at compile time. " - "Please recompile.\n")); - return -1; -} -#endif /* !LOOP_SET_FD*/