sys.c (9f46080c41d5f3f7c00b4e169ba4b0b2865258bf) sys.c (1e5d533142c1c178a31d4cc81837eb078f9269bc)
1/*
2 * linux/kernel/sys.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */
6
7#include <linux/config.h>
8#include <linux/module.h>

--- 362 unchanged lines hidden (view full) ---

371 * safe to call in interrupt context.
372 */
373void emergency_restart(void)
374{
375 machine_emergency_restart();
376}
377EXPORT_SYMBOL_GPL(emergency_restart);
378
1/*
2 * linux/kernel/sys.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */
6
7#include <linux/config.h>
8#include <linux/module.h>

--- 362 unchanged lines hidden (view full) ---

371 * safe to call in interrupt context.
372 */
373void emergency_restart(void)
374{
375 machine_emergency_restart();
376}
377EXPORT_SYMBOL_GPL(emergency_restart);
378
379/**
380 * kernel_restart - reboot the system
381 *
382 * Shutdown everything and perform a clean reboot.
383 * This is not safe to call in interrupt context.
384 */
385void kernel_restart_prepare(char *cmd)
386{
387 notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd);
388 system_state = SYSTEM_RESTART;
389 device_shutdown();
390}
379void kernel_restart_prepare(char *cmd)
380{
381 notifier_call_chain(&reboot_notifier_list, SYS_RESTART, cmd);
382 system_state = SYSTEM_RESTART;
383 device_shutdown();
384}
385
386/**
387 * kernel_restart - reboot the system
388 * @cmd: pointer to buffer containing command to execute for restart
389 * or NULL
390 *
391 * Shutdown everything and perform a clean reboot.
392 * This is not safe to call in interrupt context.
393 */
391void kernel_restart(char *cmd)
392{
393 kernel_restart_prepare(cmd);
394 if (!cmd) {
395 printk(KERN_EMERG "Restarting system.\n");
396 } else {
397 printk(KERN_EMERG "Restarting system with command '%s'.\n", cmd);
398 }

--- 1456 unchanged lines hidden ---
394void kernel_restart(char *cmd)
395{
396 kernel_restart_prepare(cmd);
397 if (!cmd) {
398 printk(KERN_EMERG "Restarting system.\n");
399 } else {
400 printk(KERN_EMERG "Restarting system with command '%s'.\n", cmd);
401 }

--- 1456 unchanged lines hidden ---