Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Minor cleanups #113

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions config.def.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ static const char * const TTY_DEVICE_BASE = "/dev/tty";
/* full path to kernel sysrq control file: */
static const char * const SYSRQ_PATH = "/proc/sys/kernel/sysrq";

/* full path to kernel printk file: */
/* full path to kernel printk file: */
static const char * const PRINTK_PATH = "/proc/sys/kernel/printk";

3 changes: 1 addition & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void setup_signal(int signum, void (*handler)(int)) {
sigact.sa_flags = 0;
sigact.sa_handler = handler;
sigemptyset(&sigact.sa_mask);

if (sigaction(signum, &sigact, NULL) < 0)
error(0, errno, "signal %d", signum);
}
Expand Down Expand Up @@ -220,4 +220,3 @@ int main(int argc, char **argv) {

return 0;
}

3 changes: 1 addition & 2 deletions options.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void print_version() {

void parse_options(int argc, char **argv) {
int opt;

progname = strrchr(argv[0], '/');
progname = progname != NULL ? progname + 1 : argv[0];

Expand Down Expand Up @@ -78,4 +78,3 @@ void parse_options(int argc, char **argv) {
}
}
}

2 changes: 1 addition & 1 deletion physlock.1
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ Print version information to standard output and exit.
Bert Muennich <ber.t at gmx.com>
.SH HOMEPAGE
.TP
http://github.com/muennich/physlock
https://github.com/muennich/physlock
.SH SEE ALSO
.BR vlock (1)
1 change: 0 additions & 1 deletion physlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,3 @@ void vt_secure(vt_t*);
CLEANUP void vt_reset(vt_t*);

#endif /* PHYSLOCK_H */

1 change: 0 additions & 1 deletion session.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,3 @@ int get_user_utmp(userinfo_t *uinfo, int vt) {
}
return ret;
}

1 change: 0 additions & 1 deletion util.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,3 @@ CLEANUP ssize_t write_int_to_file(const char *path, int value) {
snprintf(buf, sizeof(buf), "%d\n", value);
return write_file(path, buf, strlen(buf));
}

3 changes: 1 addition & 2 deletions vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void vt_get_current(int *nr, uid_t *owner) {

CLEANUP int vt_lock_switch(int set) {
int ret;

if (set) {
while ((ret = ioctl(fd, VT_LOCKSWITCH, 1)) == -1 && errno == EINTR);
if (ret == -1)
Expand Down Expand Up @@ -152,4 +152,3 @@ CLEANUP void vt_reset(vt_t *vt) {
fprintf(vt->ios, "\033[H\033[J"); /* clear the screen */
tcsetattr(vt->fd, TCSANOW, &vt->term_orig);
}