⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctrlaltdel.c

📁 Util-linux 软件包包含许多工具。其中比较重要的是加载、卸载、格式化、分区和管理硬盘驱动器
💻 C
字号:
/* * ctrlaltdel.c - Set the function of the Ctrl-Alt-Del combination * Created 4-Jul-92 by Peter Orbaek <poe@daimi.aau.dk> * ftp://ftp.daimi.aau.dk/pub/linux/poe/ * 1999-02-22 Arkadiusz Mi秌iewicz <misiek@pld.ORG.PL> * - added Native Language Support * */#include <stdio.h>#include <unistd.h>#include <stdlib.h>#include <string.h>#include "linux_reboot.h"#include "nls.h"intmain(int argc, char *argv[]) {	setlocale(LC_ALL, "");	bindtextdomain(PACKAGE, LOCALEDIR);	textdomain(PACKAGE);		if(geteuid()) {		fprintf(stderr,		    _("You must be root to set the Ctrl-Alt-Del behaviour.\n"));		exit(1);	}	if(argc == 2 && !strcmp("hard", argv[1])) {		if(my_reboot(LINUX_REBOOT_CMD_CAD_ON) < 0) {			perror("ctrlaltdel: reboot");			exit(1);		}	} else if(argc == 2 && !strcmp("soft", argv[1])) {		if(my_reboot(LINUX_REBOOT_CMD_CAD_OFF) < 0) {			perror("ctrlaltdel: reboot");			exit(1);		}	} else {		fprintf(stderr, _("Usage: ctrlaltdel hard|soft\n"));		exit(1);	}	exit(0);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -