Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I am writing a kernel driver for a special device. In such situation I have to write message to syslog printk(KERN_ERR ... and do a correct restart of the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Cmm
    Cmm is offline
    Just Joined!
    Join Date
    Jul 2006
    Posts
    2

    How to restart linux correctly.


    Hi,

    I am writing a kernel driver for a special device. In such situation I have to write message to syslog printk(KERN_ERR ... and do a correct restart of the system.
    I tried kernel_restart(NULL) but it does immediate unconditional restart - message is lost.

    Any suggestion?

    Thanx for help.

  2. #2
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    Use a timeout before restart.

    You can use utime and maybe if the error is not critical, schedule_timeout.

    Best regards

  3. #3
    Cmm
    Cmm is offline
    Just Joined!
    Join Date
    Jul 2006
    Posts
    2
    Hi,

    I solved my problem by sending request to user space. And there can be run "reboot" command.

    Thanks.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •