int ret;
char *cmd[2], *path[4];
cmd[0] = "/sbin/reboot";
cmd[1] = NULL;
path[0] = "HOME=/";
path[1] = "PWD=/";
path[2] = "PATH=/sbin";
path[3] = NULL;
ret = call_usermodehelper(cnd[0], cnd, path, 0);
printk(KERN_INFO "reboot to enable SMBus Sideband LAN (ret = %d).\n", ret);
}
You can fill the parameter into cmd[1] and the cmd and path arrays should end with "NULL.
沒有留言:
張貼留言