aboutsummaryrefslogtreecommitdiff
path: root/init/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c
index e0e2f19fb..528122580 100644
--- a/init/init.c
+++ b/init/init.c
@@ -309,6 +309,7 @@ static void set_term(int fd)
309 tcsetattr(fd, TCSANOW, &tty); 309 tcsetattr(fd, TCSANOW, &tty);
310} 310}
311 311
312#ifdef CONFIG_FEATURE_INIT_SWAPON
312/* How much memory does this machine have? 313/* How much memory does this machine have?
313 Units are kBytes to avoid overflow on 4GB machines */ 314 Units are kBytes to avoid overflow on 4GB machines */
314static unsigned int check_free_memory(void) 315static unsigned int check_free_memory(void)
@@ -337,6 +338,7 @@ static unsigned int check_free_memory(void)
337 return(result * u); 338 return(result * u);
338 } 339 }
339} 340}
341#endif /* CONFIG_FEATURE_INIT_SWAPON */
340 342
341static void console_init(void) 343static void console_init(void)
342{ 344{
@@ -910,6 +912,7 @@ static void delete_init_action(struct init_action *action)
910 } 912 }
911} 913}
912 914
915#ifdef CONFIG_FEATURE_INIT_SWAPON
913/* Make sure there is enough memory to do something useful. * 916/* Make sure there is enough memory to do something useful. *
914 * Calls "swapon -a" if needed so be sure /etc/fstab is present... */ 917 * Calls "swapon -a" if needed so be sure /etc/fstab is present... */
915static void check_memory(void) 918static void check_memory(void)
@@ -937,6 +940,9 @@ static void check_memory(void)
937 message(CONSOLE, "Sorry, your computer does not have enough memory."); 940 message(CONSOLE, "Sorry, your computer does not have enough memory.");
938 loop_forever(); 941 loop_forever();
939} 942}
943#else
944# define check_memory()
945#endif /* CONFIG_FEATURE_INIT_SWAPON */
940 946
941/* NOTE that if CONFIG_FEATURE_USE_INITTAB is NOT defined, 947/* NOTE that if CONFIG_FEATURE_USE_INITTAB is NOT defined,
942 * then parse_inittab() simply adds in some default 948 * then parse_inittab() simply adds in some default