We're not Russian roulette players, so don't use such ugly things at all..
Reported-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
# define MNT_PROCFS 0x0001
# define MNT_DEVTMPFS 0x0002
-static __attribute__((__destructor__))
void emergency_do_umounts(void)
{
if (emergency_flags & MNT_DEVTMPFS)
umount2("/proc", MNT_DETACH);
}
-static __attribute__((__constructor__))
void emergency_do_mounts(void)
{
struct stat rt, xt;
}
}
}
+
+#else /* !USE_SULOGIN_EMERGENCY_MOUNT */
+
+void emergency_do_umounts(void) { }
+void emergency_do_mounts(void) { }
+
#endif /* USE_SULOGIN_EMERGENCY_MOUNT */
/*
*
* Author: Werner Fink <werner@suse.de>
*/
+#ifndef UTIL_LINUX_SULOGIN_CONSOLES_H
+#define UTIL_LINUX_SULOGIN_CONSOLES_H
#include <sys/types.h>
#include <stdint.h>
extern int detect_consoles(const char *device, int fallback,
struct list_head *consoles);
+
+extern void emergency_do_umounts(void);
+extern void emergency_do_mounts(void);
+
+#endif /* UTIL_LINUX_SULOGIN_CONSOLES_H */
mask_signal(SIGINT, SIG_IGN, &saved_sigint);
mask_signal(SIGHUP, SIG_IGN, &saved_sighup);
+
+ emergency_do_mounts();
+ atexit( emergency_do_umounts );
+
/*
* See if we need to open an other tty device.
*/